Support Forum

Problem with Recent Post WordPress Sidebar

GA gabs
gabs
Member

Hello,

I found your plugin, and I prefer your other plugins forum.
But, I encounter a problem with WordPress recent post that I have integrated with the sidebar code :
 <?php query_posts('showposts=5'); ?>
  <?php while (have_posts()) : the_post(); ?>
  <?php the_title(); ?>
  <?php the_content(); ?>
//or
  <?php the_excerpt() ?> 
  <?php endwhile; ?>
The function the_content() or the_excerpt() displays both the forum in each of the post in addition to the forum on the main page.

How can I avoid this?

P.S. : Sorry if my English is average because I'm french Embarassed

3 Answers

New Answer

RA -Radio-
-Radio-
Member

Using the_content() outside of the loop is actually bad programing format and can break may plugins (not just SPF).

The data you need is presented in an array and should be copied into your own array for manipulation and display. This prevents breakage on the_content(), and allows for greater flexibility when organizing or displaying the data.

YS Yellow Swordfish
Yellow Swordfish
Member

There is an explanation of the problem in the FAQ which can be found by clicking on the FAQ button up top beside the login button.