Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
 
Prev Previous Post   Next Post Next
  #1  
Old Apr 27, 2011, 12:11 AM
bonnbonn
 
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

Code:
<?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!
BonnBonn
 

Bookmarks

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 04:46 PM.


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