How To Remove Genesis Site Footer Widget Area - Genesis Beginner

Sunday, February 12, 2017

How To Remove Genesis Site Footer Widget Area

The following post applies to older versions of our themes. The current versions no longer have widgetized footers.
In the previous post Child Theme Update I announced an update to our Genesis child themes. This update brought a new widget area to the .site-footer of our themes.

I explained that there are several ways to change the content of the .site-footer including modifying the functions.php file or through the use of plugins such as the Genesis Simple Edits plugin. However, I decided that the easiest way to modify this content was simply to widgetize the .site-footer area. Our child themes will continue to include this new widget area from this point forward.
Having said that it occurred to me that some of you may already be using a plugin solution to achieve this result and the new widget area might interfere with that. If this sounds like you then read on.
Here is how to remove the .site-footer widget area from our updated themes:
We will be editing 2 files from each theme,
  1. functions.php file
  2. page_landing.php file
Before we begin please use an FTP client like FileZilla to download your child theme’s functions.php file and page_landing.php file to your desktop and make a backup of them. Edit the files you downloaded then re-upload them to your site. Never use the built-in WordPress editor. If you make a mistake you’ll kill your site and will have to FTP in to fix it anyway.

BlogNews

1. functions.php
Open the BlogNews functions.php file in a plain text editor like Notepad++ and scroll down to about Line 93. Remove or comment out the following,
//* Unhook Genesis footer and add custom widget area
remove_action( 'genesis_after', 'genesis_do_footer', 12 );
add_action( 'genesis_after', 'blognews_footer', 12 );
function blognews_footer() {
                genesis_widget_area( 'blognews_footer', array(
  'before' => '<div class="blognews_footer widget-area">',
  'after'  => '</div>',
    ) );

}
Next, scroll down to the bottom to about Line 148. Remove or comment out the following,
genesis_register_sidebar( array(
 'id'  => 'blognews_footer',
 'name'  => __( 'Blognews Footer', 'blognews' ),
 'description' => __( 'This is the custom footer area.', 'blognews' ),
) );
Save the file and re-upload it to your site.
2. page_landing.php
Open the BlogNews page_landing.php file and scroll down to about Line 44. Remove or comment out the following,
remove_action( 'genesis_after', 'blognews_footer', 12 );
Save the file and re-upload it to your site. If you make a mistake you have the backups of both files to rely on. You did make a backup of both files right?

ElevenHundred

1. functions.php
Open the ElevenHundred functions.php file in a plain text editor like Notepad++ and scroll down to about Line 135. Remove or comment out the following,
//* Unhook Genesis footer and add custom widget area
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'elevenhundred_footer' );
function elevenhundred_footer() {
                genesis_widget_area( 'elevenhundred_footer', array(
  'before' => '<div class="elevenhundred_footer widget-area">',
  'after'  => '</div>',
    ) );

}
Next, scroll down to the bottom to about Line 167. Remove or comment out the following,
genesis_register_sidebar( array(
 'id'  => 'elevenhundred_footer',
 'name'  => __( 'ElevenHundred Footer', 'elevenhundred' ),
 'description' => __( 'This is the custom footer area.', 'elevenhundred' ),
) );
Save the file and re-upload it to your site.
2. page_landing.php
Open the ElevenHundred page_landing.php file and scroll down to about Line 44. Remove or comment out the following,
remove_action( 'genesis_footer', 'elevenhundred_footer' );
Save the file and re-upload it to your site.

Malcolm

1. functions.php
Open the Malcolm functions.php file in a plain text editor like Notepad++ and scroll down to about Line 100. Remove or comment out the following,
//* Unhook Genesis footer and add custom widget area
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'malcolm_footer' );
function malcolm_footer() {
                genesis_widget_area( 'malcolm_footer', array(
  'before' => '<div class="malcolm_footer widget-area">',
  'after'  => '</div>',
    ) );

}
Next, scroll down to the bottom to about Line 167. Remove or comment out the following,
genesis_register_sidebar( array(
 'id'  => 'malcolm_footer',
 'name'  => __( 'Malcolm Footer', 'malcolm' ),
 'description' => __( 'This is the custom footer area.', 'malcolm' ),
) );
Save the file and re-upload it to your site.
2. page_landing.php
Open the Malcolm page_landing.php file and scroll down to about Line 45. Remove or comment out the following,
remove_action( 'genesis_footer', 'malcolm_footer' );
Save the file and re-upload it to your site.

Marcus

1. functions.php
Open the Marcus functions.php file in a plain text editor like Notepad++ and scroll down to about Line 100. Remove or comment out the following,
//* Unhook Genesis footer and add custom widget area
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'marcus_footer' );
function marcus_footer() {
                genesis_widget_area( 'marcus_footer', array(
  'before' => '<div class="marcus_footer widget-area">',
  'after'  => '</div>',
    ) );

}
Next, scroll down to the bottom to about Line 167. Remove or comment out the following,
genesis_register_sidebar( array(
 'id'  => 'marcus_footer',
 'name'  => __( 'Marcus Footer', 'marcus' ),
 'description' => __( 'This is the custom footer area.', 'marcus' ),
) );
Save the file and re-upload it to your site.
2. page_landing.php
Open the Marcus page_landing.php file and scroll down to about Line 45. Remove or comment out the following,
remove_action( 'genesis_footer', 'marcus_footer' );
Save the file and re-upload it to your site.

Winfield

1. functions.php
Open the Winfield functions.php file in a plain text editor like Notepad++ and scroll down to about Line 73. Remove or comment out the following,
//* Unhook Genesis footer and add custom widget area
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'winfield_footer' );
function winfield_footer() {
                genesis_widget_area( 'winfield_footer', array(
  'before' => '<div class="winfield_footer widget-area">',
  'after'  => '</div>',
    ) );

}
Next, scroll down to the bottom to about Line 120. Remove or comment out the following,
genesis_register_sidebar( array(
 'id'  => 'winfield_footer',
 'name'  => __( 'Winfield Footer', 'winfield' ),
 'description' => __( 'This is the custom footer area.', 'winfield' ),
) );
Save the file and re-upload it to your site.
2. page_landing.php
Open the Winfield page_landing.php file and scroll down to about Line 44. Remove or comment out the following,
remove_action( 'genesis_footer', 'winfield_footer' );
Save the file and re-upload it to your site.
Optional step
Each of our themes include a .pot file for easy translating. This file can be found at themes/childtheme/lib/languages. You can edit this file if you wish to remove the 2 new strings added by the .site-footer widget area. This is purely an optional step and won’t hurt anything if you choose to leave it as is.

No comments: