Support Forum
Problem with Recent Post Wordpress Sidebar
gabs
Rookie
Free Members
Offline
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 while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
//or
<?php the_excerpt() ?>
<?php endwhile; ?>
<?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 [Image Can Not Be Found]
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.
It took a Particle Physicist to re-invent the Green Revolution
A new idea in Catiptalistic Ecology
Save the Planet – Earn some Green
http://PlanetGreenCentral.com/
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625