Certain Genesis child themes like the Genesis Sample defines some features like the number of footer widget areas in config/theme-supports.php
like this:
'genesis-footer-widgets' => 3,
Full code:
<?php
/**
* Genesis Sample child theme.
*
* Theme supports.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/
return [
'genesis-custom-logo' => [
'height' => 120,
'width' => 700,
'flex-height' => true,
'flex-width' => true,
],
'html5' => [
'caption',
'comment-form',
'comment-list',
'gallery',
'navigation-widgets',
'search-form',
'script',
'style',
],
'genesis-accessibility' => [
'drop-down-menu',
'headings',
'search-form',
'skip-links',
],
'genesis-after-entry-widget-area' => '',
'genesis-footer-widgets' => 3,
'genesis-menus' => [
'primary' => __( 'Header Menu', 'genesis-sample' ),
'secondary' => __( 'Footer Menu', 'genesis-sample' ),
],
];
Generally speaking, child themes are meant to be customized. So if you are looking to change the number of footer widget areas to say 4, it is okay to change the number in L37 of the above file.
That said, some users prefer to keep all their customizations separately in a functionality plugin so that they can freely update the child theme without worrying about their changes getting overwritten by the child theme update.
It is possible to override the child theme’s add_theme_support
definition when using a functionality plugin. Here’s how.
Step 1
Install and activate a custom functionality plugin. Here’s the one I put together and use.
Step 2
Connect to your hosting account using a FTP client and navigate to site’s /wp-content/plugins/my-custom-functionality-master
.
Edit plugin.php
and add the following at the end:
add_action( 'after_setup_theme', 'custom_theme_supports' );
/**
* Add theme supports overriding the active child theme.
*/
function custom_theme_supports() {
add_theme_support( 'genesis-footer-widgets', '4' );
}
You should of course replace
add_theme_support( 'genesis-footer-widgets', '4' );
with whatever it is that you are trying to set/override.
That’s it.