Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

[SOLVED] query_post in sidebar widget area in php code widget thingy

Prev Previous Post   Next Post Next
Old Apr 27, 2011, 12:11 AM
5 posts · Apr 2011
[SOLVED] query_post in sidebar widget area in php code widget thingy

Hi again!

I am really in need of help, I am trying to use the code below to pull the most recent posting content from a category into a left sidebar php widget area

<?php query_posts('category_name=updates&showposts=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<?php the_content(); ?>
<?php endwhile;?>
When I do this it is posting beautifully in the left sidebar but is also overriding my page center content as well and displaying the same post in the center area. Would it be possible to have some guidance with this? I would like my center area content to stay as I have it but also do the query_post content display as I need it to in the left sidebar.

I have already tried to use the plug-in query posts but it is not letting me style it as I need to for this to work, so I am having to resort to hard coding the left widget.

Thank you for your time!


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to insert php code into widget or sidebar Stingraynut Header configuration & styling 1 Apr 6, 2010 08:25 PM
Can I hard code some text in a new widget area? horsemansarts Sidebars & Widgets 0 Nov 10, 2009 04:59 PM
[SOLVED] Strange problem with PHP Code plugin widget paulae Plugins & Atahualpa 5 Oct 1, 2009 09:43 AM
[SOLVED] PHP code widget destroyed my site! paulae Sidebars & Widgets 0 Jul 13, 2009 06:07 AM
Location for php code for SOCIABLE widget? strangelove Post-Kicker, -Byline & -Footer 1 Feb 18, 2009 06:04 PM

All times are GMT -6. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.