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] How do I restrict which pages my custom sidebars show-up on?


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

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Aug 8, 2010, 09:15 AM
wordy_gurdy
 
6 posts · Aug 2010


I decided to create 4 additional sidebars for my static front page (for custom linked categories that link to a unique page), so I basically took a short-cut and used my footer widget (that has four columns), modified the width, and added it in the content_below_loop section. The columns display perfectly, but they are also showing up on ALL of my pages. How do I restrict which pages my custom sidebars/widgets show-up on?

Thanks,
Rachel
  #2  
Old Aug 8, 2010, 09:18 AM
juggledad's Avatar
juggledad
 
22,045 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
put a php if statement around - go here to see the tests you can use - http://codex.wordpress.org/Conditional_Tags
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #3  
Old Aug 8, 2010, 09:54 AM
wordy_gurdy
 
6 posts · Aug 2010
Quote:
Originally Posted by juggledad
put a php if statement around - go here to see the tests you can use - http://codex.wordpress.org/Conditional_Tags
Thanks "juggledad". I did just as you suggested, and copied some code from the wordpress codex page to test it out. But the widgets are still showing up on all of my pages. Well, my front page is set to Test Page, and the columns show-up fine, but they are still showing on my About page. This is the conditional tag and "footer" widget code I'm using for my additional four widgets on my Test Page:

<?php if (!is_home()) {?>
<?php bfa_widget_area('name=My widget area&cells=4&align=1&align_2=9&align_3=7&width_4=1 65&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>
<?php }?>

So, I wrapped the code in the conditional tag but it didn't work. I also tried <?php if (!is_front_page.., but the widgets didn't show up at all. I also tried removing the <?php from before bfa_widget_area, but doing that disabled my widgets as well. Is there something in the widget code that I need to add or change?

Thanks again for your help,
Rachel
  #4  
Old Aug 8, 2010, 10:29 AM
juggledad's Avatar
juggledad
 
22,045 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
the statement
HTML Code:
<?php if (!is_front_page..
says 'if this is NOT the front page...' therefore, every page but the front page will get the action. Try with just
HTML Code:
<?php if (is_front_page..
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #5  
Old Aug 8, 2010, 11:02 AM
wordy_gurdy
 
6 posts · Aug 2010
THANK-YOU! It worked. You are awesome "juggledad".

Bookmarks

Tags
custom_sidebars

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
SIdebars wont show up Phocusmag Sidebars & Widgets 11 Jan 13, 2013 07:09 PM
having problems getting my sidebars to show on the buddypress pages scampy New Versions, & Updating 12 Sep 29, 2011 01:26 PM
How can I set it that I can show sidebars on my /blog page and nowhere else? X-Evolutionist Atahualpa 3 Wordpress theme 2 Mar 18, 2010 04:39 PM
Restrict posts on index to a specific category. amish_geek Center area post/pages 2 Feb 17, 2010 04:13 PM
[SOLVED] Custom Sidebars Kisekae Sidebars & Widgets 1 Oct 17, 2009 06:52 PM


All times are GMT -6. The time now is 03:50 AM.


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