In general, it is a good practice to remove the back links from your blog provides to any third party website/blog for various reasons and Search Engine Optimization (SEO) is one of the important reasons among them. I have received quite a few automated emails recently from third party theme developers to delete the back links in footer credits of their respective themes because of Penguin Update which effects both the linked and link provider. With this in mind I would like to explain how we can remove footer credits section of a wordpress theme.
Normal WordPress theme
In general, Every wordpress theme will have a separate “footer.php” file which is responsible for the contents of a footer. You can find this footer.php file in your wordpress installation folder or by selecting “footer.php” file from wordpress editor (Appearence -> Editor) and from here this point it is a plain PHP/HTML editing to customize or remove the footer credits and once done use the update option to update the file.
Modifying Footer Credits in Genesis Theme
It will be little confusing in the case of a Genesis Parent – Child Theme framework. In Genesis theme, the footer credits will be printed using the “Custom Actions”, a concept of hooking in wordpress and all you can see is some do_action( ) function calls.
Note: Action is a concept of hooking, where we associate a function to an action and call it during specific events in wordpress. For eg. writing a piece of code to print footer in a custom function and associate it with an action and trigger the action while printing footer.
Basically, do_action( ‘genesis_footer’ ) action is the key for printing the footer in a genesis theme, where it executes genesis_do_footer() function of ./lib/structure/footer.php file. It is not advised to modify any of the standard genesis functionality for various reasons hence, we are going to use the below techniques to modify the footer.
Alternative 1: Using Action Hooks
The contents of functions.php will be executed before any other code in wordpress is executed. So, writing a removing action associated with genesis_footer should stop printing of the footer.
remove_action( 'genesis_footer', 'genesis_do_footer' );
Now we are going to create another function with customized footer and associate with the same action name so that we don’t need to change anything at calling location of footer.
add_action( 'genesis_footer', 'custom_footer' ); function custom_footer() { ?> // your HTML code <?php }
Alternative 2: Using Filters
Alternatively, we can use even the Filters Concept of wordpress.
Note: Filters sit between a database and the browser and are used to filter the data in both directions.
The footers credits text is being appended to a variable with name $creds in ./lib/structure/footer.php file, If we can modify the line content at run time then we can change the data being printed in the footer. The following is the code snippet to be placed in functions.php file to modify the $creds text using filters.
add_filter('genesis_footer_creds_text', 'custom_footer_filter'); function custom_footer_filter( $creds ) { $creds = '//Your HTML Code'; return $creds; }
If you feel this as Greek and Latin you can always use plugins like Genesis Simple Edits to modify the footer of your Genesis theme.