Support » Fixing WordPress » Last Posts problem

Viewing 6 replies - 1 through 6 (of 6 total)
  • Strange.. can I see the code from your sidebar which generates the list of last posts?

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

  • ‘ . 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 ‘
  • ‘;
    }

    ?>

    <?php endif; ?>

    </div>

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

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).

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.

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.