• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Smarter (conditional?) Widgets in Footer and other areas

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Smarter (conditional?) Widgets in Footer and other areas

This topic is: not resolved

Tagged: conditional widgets, footer widgets

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 11 months ago by carasmo.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 29, 2015 at 1:57 pm #169552
    carasmo
    Participant

    Hello,

    I'm very new to WordPress and Genesis so I may not know the correct term for this and that.

    I am building a custom site and regarding the footer, there's three widgets in the footer (I used Genesis sample to begin) and whether or not these widgets are empty or filled the divs for these widgets are still there.

    I figured that if you want to have 1 widget, 2 widgets, or 3 it would only output those wrappers and perhaps, if two widgets, then you can do some css .footer-widgets footer-widgets-2-col and so forth.

    Do you follow? Essentially, if 1 footer widget then center 100%, if 2 footer widgets, then 50%/50%, and if 3, 33.333% (I changed all of the css to mobile first with percentages -- I was surprised that It was't like this by default).

    What can be done to make this kind of thing?

    Thanks!


    Genesis Theme Customization and Help

    October 29, 2015 at 11:53 pm #169577
    Tom
    Participant

    Hi @carasmo, and welcome to WordPress and Genesis,

    See: http://my.studiopress.com/tutorials/add-footer-widgets/

    Genesis Sample theme ships with 3 footer widget areas, initially at 340px each, as part of the design using this snippet in functions.php:

    /* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );

    If your design needs only 2-column widgets, replace that with:
    add_theme_support( 'genesis-footer-widgets', 2 );

    ... leaving only two widget areas output in the footer-widgets HTML.

    Then you can tweak your CSS as necessary for the number of widget areas. At around line 1442 of the Sample stylesheet you'll find the code for the footer widget areas.

    For your % values, don't forget to allow for margins where necessary.


    Choose your next site design from over 350 Genesis themes.
    [ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]

    October 30, 2015 at 7:39 am #169604
    carasmo
    Participant

    Thanks!


    Genesis Theme Customization and Help

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble