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 » Plugins & Atahualpa »

Using Query Posts plugin in non-widget area


  #1  
Old May 27, 2009, 06:30 PM
viewdesigninc
 
35 posts · Mar 2009
I'd like to use Query Posts to organize a page of posts as a portfolio. How do I use it in the center column, rather than as a widget/sidebar?
  #2  
Old May 31, 2009, 07:36 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
There is no widget area in the center column so you'd have to manually add it in index.php
  #3  
Old Jun 2, 2009, 01:40 PM
viewdesigninc
 
35 posts · Mar 2009
adding Query Posts or other plugins to center column

Would it be feasible to post the code to insert a plugin (ie. Query Posts) in the center column and where it goes in index.php? I'm comfortable with html and css, but not so much with the php.
  #4  
Old Jun 4, 2009, 08:56 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
It is just a convention to name widget areas "sidebars", they don't need to be a "bar on the side". Adding a new widget is a 2 step process.

1. Add widget area code to functions.php. This changes in 3.3.4. I am posting the new code for 3.3.4. You can use this and replace the whole section from line 7 to (including) line 41 in functions.php of 3.3.3 with this new code (both the black and the green part, everything that is bold):

// Sidebars:
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name'=>'Left Sidebar',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title"><h3>',
'after_title' => '</h3></div>',
));
register_sidebar(array(
'name'=>'Right Sidebar',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title"><h3>',
'after_title' => '</h3></div>',
));
register_sidebar(array(
'name'=>'New Widget Area',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title"><h3>',
'after_title' => '</h3></div>',
));

}


GREEN = new widget area. The new widget area will be listed at Site Admin -> Widgets -> Current Widgets -> (Drop down select menu) "New Widget Area" [Show]

New Widget Area = Title under which this widget area will be listed at (Drop down select menu) "New Widget Area" [Show]

2. Put the corresponding, actual widget area somewhere into the layout by editing the appropriate template file, i.e. index.php right after get_header(); ?> to put the new widget area at the top of the center column:


<?php // Widgetize the New Widget Area:
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>

<!-- Here you can put some default content, which will be removed once the first widget was added to this widget area. You can also leave this blank to have no "hard coded" default content -->

<?php endif; ?>



3 because this is "the 3rd from top in the list of widget areas defined in functions.php".
  #5  
Old Jun 17, 2009, 07:59 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I've successfully added a widgetized area at the top of the center column. However, I would rather have it at the very top, even before the container starts, as at http://www.cnn.com/. This would let me get rid of an ad group to the right of our logo. I tried putting the widget code just before
Code:
<?php get_header(); ?>
, but it messed up the page really terribly. Obviously, that's not the right spot, but I can't figure out where to put it. I am still using ATA 3.2.
  #6  
Old Jun 18, 2009, 04:28 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
To add it right below the header, add it after

<?php bfa_header_config($bfa_ata_configure_header); ?>

in header.php
  #7  
Old Jun 18, 2009, 04:50 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
That didn't work. I couldn't get anything to show up when I was trying an image. I tried just the word "testing" in a text widget, and it showed up, but not where I want it. It appeared under my category menu bar.

I want it above all of the content, above the container itself, not above the sidebars and center column.

Also, remember we modified the header so I'd have 3 cells?

EDIT:

OK, I think I have it. I put it here:
Code:
<body<?php echo ($bfa_ata_html_inserts_body_tag != "" ? ' ' . apply_filters(widget_text, $bfa_ata_html_inserts_body_tag) : ''); ?>>
<?php echo ($bfa_ata_html_inserts_body_top != "" ? apply_filters(widget_text, $bfa_ata_html_inserts_body_top) : ''); ?>
<?php // Widgetize the New Widget Area:
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
testing

<?php endif; ?>
Should that be OK?

EDIT 2:

Well. It worked, sort of. I had to take it down because our new edition is published tonight, so I can't have the page looking weird right now. What happened was that the images did show up, but when the page first loaded, the image was all the way to the left, outside the structure of the page. When the next image in the slideshow loaded, the whole thing popped back up top where it's supposed to be, and ran OK after that. I assume I need some kind of div there to hold it in place?

Last edited by paulae; Jun 18, 2009 at 05:22 PM.
  #8  
Old Jun 19, 2009, 10:32 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The place where you put it is outside the whole layout, the width wrapper etc.

header.php:


</colgroup>

put it here (above header, in it's own <TR>...</TR>) as:
<tr><td colspan="<?php echo $bfa_ata['cols']; ?>"> ...
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
<?php endif; ?>
</td></tr>


<tr>

<!-- Header -->
<td id="header" colspan="<?php echo $bfa_ata['cols']; ?>">
or put it here (above header) as:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
<?php endif; ?>

<?php bfa_header_config($bfa_ata['configure_header']); ?>
or put it here (below header) as:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
<?php endif; ?>

</td>
<!-- / Header -->

</tr>

<!-- Main Body -->
<tr id="bodyrow">
  #9  
Old Jun 19, 2009, 03:03 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
OK! I got that working! Thank you!

Bookmarks

Tags
gallery, gallery of posts, portfolio, query posts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I add a widget area inside the logo bar? jfriedman Header configuration & styling 8 Jun 26, 2011 09:59 PM
New widget area in header paulae Sidebars & Widgets 10 Jul 3, 2009 02:45 PM
Struggling to install and implement Similar Posts ( V: 2.6.2.0) WPress plugin. pano Plugins & Atahualpa 6 Apr 22, 2009 02:37 PM
Replace posts on index page with a plugin vincotek Plugins & Atahualpa 3 Apr 5, 2009 05:40 PM
Sidebar query Axon Sidebars & Widgets 2 Feb 10, 2009 02:58 PM


All times are GMT -6. The time now is 08:20 PM.


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