WordPress.org

Ready to get started?Download WordPress

Forums

Last Posts problem (7 posts)

  1. Robin
    Member
    Posted 8 years ago #

    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

  2. Aleister
    Member
    Posted 8 years ago #

    Strange.. can I see the code from your sidebar which generates the list of last posts?

  3. Robin
    Member
    Posted 8 years ago #

    <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 "

  4. ID'>";
    the_title();
    echo '
  5. ';
    }
    ?>

    <?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 '

  6. ' . sprintf('%s <span style="text-transform: lowercase;">on </span>%s', get_comment_author_link(), 'comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '');
    echo '
  7. ';
    }

    ?>

    <?php endif; ?>

    </div>

  • Kafkaesqui

    Posted 8 years ago #

    Where do you assign $recentposts? It's not in the code above.

  • Aleister
    Member
    Posted 8 years ago #

    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
    Member
    Posted 8 years ago #

    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
    Member
    Posted 8 years ago #

    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.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags