- This topic has 2 replies, 2 voices, and was last updated 7 years, 11 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
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.
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?
Hi @carasmo, and welcome to WordPress and Genesis,
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.
© 2023 WPEngine, Inc.