Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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?


  #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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
put a php if statement around - go here to see the tests you can use - http://codex.wordpress.org/Conditional_Tags
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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..
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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 01:57 AM.


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