Ready to get started?Download WordPress


[resolved] Change col classes for banner widget areas (4 posts)

  1. SLeece
    Posted 11 months ago #

    Hi Anthony!

    I really love your theme! Thanks! :)

    I'm building a theme using Quark as a starter and I have a quick question about the banner area. How would I change the col classes for this area? I understand that it is currently set to be dynamic, but I have no need for more than two widget areas in my current project. Ideally I'd like the left banner widget area to be "7_of_12" and the right banner widget area to be "3_of_12". I'd post a link to my site but I'm building my theme locally. My guess is that the banner widget col classes would have to be changed in the header.php file, but I'm not sure about this. I'm also a novice with PHP so I'm not sure what part would need to be changed. :/

    Thanks so much for any advice you can give!

  2. ahortin
    Theme Author

    Posted 10 months ago #

    To change the banner widgets so it's 7 columns on the left and 5 columns on the right (ie. it needs to total 12 columns), then you would need to change the code in header.php to something like the following, within bannercontainer.

    <?php if ( is_front_page() ) { ?>
        <div class="col grid_7_of_12">
            <div class="widget-area" role="complementary">
                <?php dynamic_sidebar( 'frontpage-banner1' ); ?>
            </div> <!-- /.widget-area -->
        </div> <!-- /.col.grid_7_of_12 -->
        <div class="col grid_5_of_12">
            <div class="widget-area" role="complementary">
                <?php dynamic_sidebar( 'frontpage-banner2' ); ?>
            </div> <!-- /.widget-area -->
        </div> <!-- /.col.grid_5_of_12 -->
    <?php  } ?>
  3. SLeece
    Posted 10 months ago #

    That worked perfectly! Thank you so much!! :)

  4. ahortin
    Theme Author

    Posted 10 months ago #

    You're very welcome :-)


You must log in to post.

About this Theme

About this Topic


No tags yet.