Community Forums › Forums › Design Tips and Tricks › Adding Widget To Child Theme
This topic contains 1 reply, has 2 voices, and was last updated by Sridhar Katakam 3 months ago.
-
AuthorPosts
-
February 20, 2013 at 6:04 pm #21836
Hey again,
I’m using the Crystal Child theme on my site and I wanted to add some widgets under the existing ones.
http://vps8699.inmotionhosting.com/~arkadiap/
So under the exising 3 columns I wanted to add a 2/3 widget and a 1/3 widget to simulate a sidebar on the lower part of the page. The Associate Child theme has this type of layout..
Any help with the php additions are appreciated.
Thanks
Eric
February 20, 2013 at 6:53 pm #218391) Install and activate Simple Sidebars plugin.
Go to Genesis -> Simple Sidebars and create two sidebars.
Ex.: http://cl.ly/image/0E32011v2v2D
2) Edit child themes home.php. Before
<?php get_footer(); ?>
, add the following:
<div id="my-home-bottom"> <div class="my-home-bottom-left"> <div class="wrap"> <?php if (!dynamic_sidebar('My Home Bottom Left')) : ?> <div class="widget"> <h4><?php _e("My Home Bottom Left Widget", 'genesis'); ?></h4> <p><?php _e("This is a widgeted area which is called My Home Bottom Left. To get started, log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag any widget of your choice into the My Home Bottom Left widget area on the right hand side.", 'genesis'); ?></p> </div><!-- end .widget --> <?php endif; ?> </div><!-- end .wrap --> </div><!-- end .my-home-bottom-1 --> <div class="my-home-bottom-right"> <div class="wrap"> <?php if (!dynamic_sidebar('My Home Bottom Right')) : ?> <div class="widget"> <h4><?php _e("My Home Bottom Right Widget", 'genesis'); ?></h4> <p><?php _e("This is a widgeted area which is called My Home Bottom Right. To get started, log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag any widget of your choice into the My Home Bottom Right widget area on the right hand side.", 'genesis'); ?></p> </div><!-- end .widget --> <?php endif; ?> </div><!-- end .wrap --> </div><!-- end .home-bottom-2 --> </div><!-- end #my-home-bottom -->3) Add the following at the end of child theme’s style.css (WP dashboard -> Appearance -> Editor):
#my-home-bottom { clear: both; } #my-home-bottom .my-home-bottom-left { float: left; border-right: 1px solid #DBDEE4; margin: 0 20px 0 0; width: 636px; } #my-home-bottom .my-home-bottom-right { float: right; width: 303px; } -
AuthorPosts
You must be logged in to reply to this topic.