How to display the last post with links?
-
How to display the last post with links?
Prompt sample code to output:
1) popular post (preferably by jetpack statistics)
2) popular posts in the last 7 days
3) The last post
4) The last 5 postsAto I have when using such code only headlines are displayed
[insert_php]$month = date('m'); $year = date('Y'); query_posts('post_type=post&posts_per_page=5&meta_key=post_views_count&orderby=meta_value_num&year=' . $year . '&monthnum=' . $month); while (have_posts()): the_post(); ?> <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></li> <?php endwhile; wp_reset_query();[/insert_php]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to display the last post with links?’ is closed to new replies.