Adding Widget To Child Theme

Community Forums Forums Design Tips and Tricks Adding Widget To Child Theme

This topic is: not resolved

This topic contains 2 replies, has 3 voices, and was last updated by  wamorrisdenver 9 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21836

    murthax
    Participant
    Post count: 3

    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

    #21839

    Sridhar Katakam
    Participant
    Post count: 849

    1) 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;
    }
    

    #50693

    wamorrisdenver
    Participant
    Post count: 1

    Will this code work for Associates child theme?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.