Title: Last Posts problem
Last modified: August 18, 2016

---

# Last Posts problem

 *  [Robin](https://wordpress.org/support/users/hismuse/)
 * (@hismuse)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/)
 * Ok, the “last posts” section on the sidebar does not show the last posts suddenly.
   The posts it’s showing are from around the time of St. Patrick’s Day.
 * [http://fragilemusings.net](http://fragilemusings.net)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [aleister](https://wordpress.org/support/users/aleister/)
 * (@aleister)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-371916)
 * Strange.. can I see the code from your sidebar which generates the list of last
   posts?
 *  Thread Starter [Robin](https://wordpress.org/support/users/hismuse/)
 * (@hismuse)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-372037)
 * <h4>Last posts</h4>
    <ul class=”mnav”> <?php foreach ($recentposts as $post) {
   if ($post->post_title == ”) $post->post_title = sprintf(__(‘Post #%s’), $post-
   >ID); echo ”
    - ID’>”;
       the_title(); echo ‘
    - ‘;
       } ?>
    - <?php endif; ?>
    - <?php
       global $comment;
    - if ( $comments = $wpdb->get_results(“SELECT comment_author, comment_author_url,
      comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved=’1′
      ORDER BY comment_date_gmt
       DESC LIMIT 5″) ) : ?>
    - <h4><?php _e(‘Last Comments’); ?></h4>
       <ul class=”mnav”> <?php foreach ($
      comments as $comment) { echo ‘
    - ‘);
       echo ‘
    - ‘;
       }
    - ?>
    - <?php endif; ?>
    - </div>
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-372043)
 * Where do you assign $recentposts? It’s not in the code above.
 *  [aleister](https://wordpress.org/support/users/aleister/)
 * (@aleister)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-372097)
 * Also, if you wrap code tags around code that you paste in here, it will show 
   up properly.
 * Kafkaesqui raises a good question. The code does not show where the actual list
   of recent posts is being generated (in $recentposts).
 *  [saspen](https://wordpress.org/support/users/saspen/)
 * (@saspen)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-372098)
 * Sorry, you need to enable sending referrers for this feature to work.
 * Ok
 * I have come to my limit with server based apps that change on the fly and have
   no concrete resolutions to bugs that occur constantly. I have posted to the blog
   before, it is our companies blog and all of a sudden we start getting the above
   error.
 * We have followed the FAQ’s and trouble shooting with NO SUCCESS.
 * I want a solution to this please.
 *  [saspen](https://wordpress.org/support/users/saspen/)
 * (@saspen)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-372120)
 * Sorry, you need to enable sending referrers for this feature to work.
 * Ok
 * I have come to my limit with server based apps that change on the fly and have
   no concrete resolutions to bugs that occur constantly. I have posted to the blog
   before, it is our companies blog and all of a sudden we start getting the above
   error.
 * We have followed the FAQ’s and trouble shooting with NO SUCCESS.
 * I want a solution to this please.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Last Posts problem’ is closed to new replies.

## Tags

 * [last](https://wordpress.org/support/topic-tag/last/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [saspen](https://wordpress.org/support/users/saspen/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/last-posts-problem/#post-372120)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
