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)
-   -   [SOLVED] about widgets (http://forum.bytesforall.com/showthread.php?t=10477)

dinoc Oct 19, 2010 02:50 PM

[SOLVED] about widgets
 
Hi guys,

Any idea if is possible to have some custom widgets only on some pages, not all pages ?
For instant I've created 3 widgets but I don't want them on all pages, I want them only on first page.

Is this possible?

Cheers

dinoc Oct 19, 2010 04:26 PM

Well, I solved this using a plugin like Widget Context or Widget Logic.
If you have other ideas please post them.

lmilesw Oct 19, 2010 08:09 PM

You can also wrap the widget code in a conditional such as
HTML Code:

<?php if( is_home() ) bfa_widget_area('name=My new widget area'); ?>
OR
HTML Code:

<?php if( is_page('4') ) bfa_widget_area('name=My new widget area'); ?>
The first will only show on a static home page and the second will only show on a page with the id of 4.

dinoc Oct 20, 2010 02:05 AM

Thanks a lot Larry!


All times are GMT -6. The time now is 10:41 AM.

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