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)
-   -   code for static home page widgets (http://forum.bytesforall.com/showthread.php?t=10221)

sober Oct 11, 2010 11:27 AM

code for static home page widgets
 
Hello

I am using the static home page option and how do I add a widget above the title that shows up ONLY when the HOME PAGE is called.It will be a page that will be the home page and not the latest post lists. I do have widgets on the same place in pages which I do not want to show up on home page. The code for the page widget is
Code:

<div id="page-top"><?php if (is_page()) { ?><?php bfa_widget_area('name=page-top'); ?><?php } ?></div>
Please let me know the solution. Thanks in advance

sober Oct 11, 2010 02:44 PM

I've tried the following code but doesn't work

Code:

<div id="page-top"><?php if (!is_front_page() || is_page()) { ?><?php bfa_widget_area('name=page-top'); ?><?php } ?></div>
<div id="page-top"><?php if ( is_home() ||  is_front_page()) { ?><?php bfa_widget_area('name=start-top'); ?><?php } ?></div>


sober Oct 11, 2010 02:49 PM

I have in the past used the theme "Thematic" from themeshaper.com which had this feature builtin, so I know its possible. Any help will be appreciated.

juggledad Oct 11, 2010 04:56 PM

use the 'New Widdget area' code and add it to ato->Style & edit CENTER COLUMN->Content ABOVE the LOOP

sober Oct 11, 2010 05:07 PM

It is when I put these there and could not make it work, that I posted as a question . Do you think that the code is correct ?. Can you give me the correct conditional tag ? I tried this one also but no success
Code:

<div id="page-top"><?php if ( is_home() ||  is_front_page() || is_page()) { ?><?php bfa_widget_area('name=start-top'); ?><?php } ?></div>

juggledad Oct 11, 2010 06:04 PM

all you need is this instead of escaping in and out of PHP
HTML Code:

<?php if ( is_home() ||  is_front_page()) { bfa_widget_area('name=start-top'); } ?>
Then go view the home page then go back to the widget age and you should see the widget area

talbin Jan 28, 2011 11:36 AM

Quote:

Originally Posted by juggledad (Post 45767)
all you need is this instead of escaping in and out of PHP
HTML Code:

<?php if ( is_home() ||  is_front_page()) { bfa_widget_area('name=start-top'); } ?>
Then go view the home page then go back to the widget age and you should see the widget area

JD - I don't know if that helped anyone else, but it sure helped me! I've been looking for the answer to adding custom widgets to the bottom of my static home page for two days - and here's the answer! I just inserted this into ATO-->Style & Edit Center Column --> Content Below the Loop and it worked like a charm. Thank you!


All times are GMT -6. The time now is 05:49 AM.

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