Exemple #1
0
function wpb_track_post_views($post_id)
{
    if (!is_single()) {
        return;
    }
    if (empty($post_id)) {
        global $post;
        $post_id = $post->ID;
    }
    wpb_set_post_views($post_id);
}
Exemple #2
0
        }
        ?>
		    		</header><!-- /post-header" -->
		    		<!-- /#post-id -->

		    		<section class="entry-content clearfix">
						<?php 
        the_content();
        ?>
					</section>
		    		
					<?php 
        edit_post_link('edit', '<footer class="entry-footer"><p>', '</p></footer>');
        ?>
				</article><!-- /post -->

				<?php 
    }
}
?>

		    </div><!-- /col-sm-9 -->

		</div>
	</div><!-- /container -->
<?php 
echo wpb_set_post_views(get_the_ID());
?>

<?php 
get_footer();
<?php get_header(); ?>

<div class="faq-single">
  <?php get_template_part('modules/faq_search') ?>

  <div class="content-container">
    <div class="email-print">
      <a href="mailto:?subject=FAQ%20from%20siggi%27s&body=<?php the_permalink(); ?>">email</a>
      <a href="javascript:window.print()">print</a>
    </div>

    <div class="faq-term">
      <h1><?php the_title(); ?></h1>
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <?php wpb_set_post_views(get_the_ID()); ?>
        <p><?php the_content(); ?></p>
      <?php endwhile; else : ?>
      <?php endif; ?>
    </div>

    <?php get_template_part('modules/most_visited_faq') ?>
  </div>
</div>

<?php get_template_part('modules/cant_find') ?>

<?php get_footer(); ?>