adding widget below post content
-
I want to add two widgets side by side in post content area below. can any one help me. I know how to register widget.
I opened funtion.php file and added below code
if ( function_exists(‘register_sidebar’) )
register_sidebar(array(‘name’ => ‘post1’,
‘before_widget’ => ‘<!— BEGIN Widget —>’,
‘before_title’ => ‘<!— BEGIN WidgetTitle —>’,
‘after_title’ => ‘<!— END WidgetTitle —>’,
‘after_widget’ => ‘<!— END Widget —>’
));if ( function_exists(‘register_sidebar’) )
register_sidebar(array(‘name ‘=> ‘post2’,
‘before_widget’ => ‘<!— BEGIN Widget —>’,
‘before_title’ => ‘<!— BEGIN WidgetTitle —>’,
‘after_title’ => ‘<!— END WidgetTitle —>’,
‘after_widget’ => ‘<!— END Widget —>’
));Next where should i add this below code ( which file) ?
<div class=”widget-post”>
<?php if ( !function_exists(‘dynamic_sidebar’) || dynamic_sidebar(‘post1’) ) : ?>
<?php endif; ?><?php if ( !function_exists(‘dynamic_sidebar’) || dynamic_sidebar(‘post2’) ) : ?>
<?php endif; ?></div>
Plz tell me in which file should i add this above code?
Next I confused about css code. I am using Twenty Ten theme.
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘adding widget below post content’ is closed to new replies.