WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. SLeece
    Member
    Posted 1 year 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
    Member
    Theme Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  4. ahortin
    Member
    Theme Author

    Posted 1 year ago #

    You're very welcome :-)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.