add_action('thematic_searchloop', 'mytheme_search_loop');
// End of the Contextual/Highlight Search functions
-//add_action( 'gform_after_submission', 'set_post_content', 10, 2 );
-//function set_post_content( $entry, $form ) {
-//// echo '<pre>', print_r($entry), '</pre>';
-// if ( $form['gfpdf_form_settings'] ){
-//
-// // get the first array key from gravity forms pdf settings array
-// reset($form['gfpdf_form_settings']);
-// $pdf_id = key($form['gfpdf_form_settings']);
-//
-// // get the pdf template that was selected in the gravity pdf settings
-// $template = $form['gfpdf_form_settings'][$pdf_id]['template'].'.php';
-//
-// // buid url required to view or download pdf forms
-// $url = get_site_url() . '/?gf_pdf='. $pdf_id . '&fid='. $form['id'] .'&lid=' . $entry['id'] . '&template=' . $template;
-// echo '<a class="pdf-form button" href="' . $url . '"> View PDF </a>';
-// }
-//}
+add_action( 'gform_after_submission', 'set_post_content', 10, 2 );
+function set_post_content( $entry, $form ) {
+ global $url;
+// echo '<pre>', print_r($entry), '</pre>';
+ if ( $form['gfpdf_form_settings'] ){
+ $post = get_post($entry[post_id]);
+
+ // get the first array key from gravity forms pdf settings array
+ reset($form['gfpdf_form_settings']);
+ $pdf_id = key($form['gfpdf_form_settings']);
+
+ // get the pdf template that was selected in the gravity pdf settings
+ $template = $form['gfpdf_form_settings'][$pdf_id]['template'].'.php';
+
+ // buid url required to view or download pdf forms
+ $url = get_site_url() . '/?gf_pdf='. $pdf_id . '&fid='. $form['id'] .'&lid=' . $entry['id'] . '&template=' . $template;
+
+ function pdf_view(){
+ global $url;
+ echo '<a class="pdf-form button" href="' . $url . '"> View PDF </a>';
+ }
+ }
+}
<main class="page-inside">
<div id="content-wrapper">
<div class="row">
-
+ <?php if( function_exists('pdf_view') ){
+ pdf_view();
+ } ?>
<div id="main-content" class="small-12 medium-push-4 medium-8 large-push-3 large-9 columns">
<?php get_template_part('parts/bread-crumbs'); ?>
<?php if(have_posts()) : while(have_posts()): the_post();?>
<?php the_content();?>
<?php endwhile; else:?>
+
<p><?php _e('Sorry, no results found.');?></p>
<?php endif;?>
</div>