Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Center column widgets only on home page? (http://forum.bytesforall.com/showthread.php?t=10555)

rocksrock Oct 21, 2010 09:17 PM

Center column widgets only on home page?
Hey there!

I am ramping up my wordpress site using Atahualpa. I have figured out how to make center column widgets below the loop, but I want them to only display on my home page. I'm very new to this, so if there is a certain place I need to put code, can you please explain it to me? To get the two widget columns to display I added this line of code in the "Content Below the Loop" section. <?php bfa_widget_area('name=CenterWidget&cells=2&align=9 '); ?>

Thanks for your help!

lmilesw Oct 21, 2010 11:33 PM

You could try using something like the followng which is a conditional. The first example if if you are using a static home page and the second is if it is a blog page but you would have to change the id of the page for your situation.

HTML Code:

<?php if( is_home() ) bfa_widget_area('name=CenterWidget&cells=2&align=9'); ?>

<?php if( is_page('44') ) bfa_widget_area('name=CenterWidget&cells=2&align=9'); ?>

gaidin Oct 30, 2010 06:34 PM

A very easy way to do this is to us the "TS custom widgets" plugin.

Its very easy to use and allow you to specify which widget appears on which page.

ps: if there are no widgets in a widget area it wont display

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

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