Hi everyone!
First time caller, long time lurker :)
I'd like to add a widget inside a div only on the homepage (just below the header but inside the main div before the container div). What I have begun was to register a sidebar widget in the functions.php as well as create a div there to hold the widget. Problem is I cannot seem to get it only to show only on the homepage. I'm new to php and understand that I could use a conditional but I do not know how to exactly write one. I'd appreciate any help!! Thank you!
Here's what I've got so far.
function div_intro_open() { ?>
<div id="intro-holder" >
<?php }
add_action('thematic_abovecontainer', 'div_intro_open');
add_action('thematic_abovecontainer','show_new_widget_area');
function div_intro_close() { ?>
</div>
<?php }
add_action('thematic_abovecontainer', 'div_intro_close');
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name'=> 'Intro Aside',
'id' => 'intro-aside',
'description' => 'This is where your header widgets go',
'before_widget' => '<h3 id="%1$s" class="widget %2$s">',
'after_widget' => '</h3>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h2>',
));
}
function show_new_widget_area(){
if (function_exists('dynamic_sidebar')){
dynamic_sidebar('intro-aside');
}
}