Support » Fixing WordPress » Recent Posts Links not working?
9 years ago
My Recent Posts Links are not working correctly. Sometimes they work sometimes I get Sorry, no posts matched your criteria.
Permalinks are set to /%scategory%/%postname%/
My Popular links work but Recent not usually.
Any help appreciated.
Is there really a trailing slash?
Yes I just checked. ANY help appreciated!
When I click on the recent post “Should Homeschoolers Teach Logic” the link should be
but in recent post its
Here is the code<h2 class=”coltitle”>Recent posts</h2>
$today = current_time(‘mysql’, 1);
if ( $recentposts = $wpdb->get_results(“SELECT ID, post_title FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 15”)):
<?php endif; ?>
I went back to my original files and replaced the code. The home page links are workig but if I am on another page the links don’t work.