Last active
January 15, 2020 07:54
-
-
Save bipinmilan/9a8a6e2707bb1e3b3a4f6b7173106489 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="popular_posts"> | |
<h3 id="popular_heading">Popular Posts </h3> | |
<?php global $post; | |
$args = array( 'numberposts' => 5, 'offset'=> 1, 'category' => 1 ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<div class="popular_thumbnail"> | |
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?><br /><?php the_title(); ?></a> | |
<?php pp_setPostViews(get_the_ID()); echo pp_getPostViews(get_the_ID());; ?> | |
</div> | |
<?php endforeach; ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment