Forums

the_content_rss Issues (5 posts)

  1. Michael Benson
    Member
    Posted 4 years ago #

    <!--recent posts start -->
      <div class="footer-recent-posts">
        <h4>Recent Posts</h4>
    
    	<ul>
    <?php
     $lastposts = get_posts('numberposts=3');
     foreach($lastposts as $post) :
        setup_postdata($post);
     ?>
    	<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a>:  <?php the_content_rss('', TRUE, '', 10); ?>
    	</li>
     <?php endforeach; ?>
    	</ul>
    
      </div>
      <!--recent posts end -->

    Hey guys, the above is some code which I am placing in my ./footer.php file to call the 3 latest blogs posted. However I am having some issues getting it to work properly; when viewing the footer on for instance a Search Result page, an Index page, or an Archive page all three latest posts load fine.

    However, when viewing an actual blog post, only the description for the most recent blog post recorded is included, with the other two featuring a blank blog description.

    Any ideas?

  2. Michael Benson
    Member
    Posted 4 years ago #

    Any idea at all on this issue?

  3. Michael Benson
    Member
    Posted 4 years ago #

    Would really appreciate any replies on this matter.

  4. 4k
    Member
    Posted 4 years ago #

    what about using an archive tag instead?

    <?php wp_get_archives('type=postbypost&limit=20&format=custom'); ?>

    changing the 20 to 3

    archive tags

  5. moshu
    Member
    Posted 4 years ago #

    Not really a "content_rss" issue... more a "post" and "loop" issue.
    Your initial loop (showing the single post) and the second loop interfere whith each other.

Topic Closed

This topic has been closed to new replies.

About this Topic