Articles on: WordPress

How To Remove Theme Footer Links

Most WordPress themes display their name with a link back to their site. Here's an example:



It's possible to remove these links. However, not all themes make it easy. In general, there are three types of themes with regard to footer links.

Those like Genesis which explicitly have provisions to remove the links

"Norma" themes with links in footer.php that we can easily remove via child themes

Themes that really make it hard to remove links and force you to edit core parent theme files

If you're lucky, your theme is either (1) or (2). If it's (3), it's a bit of a headache, but possible as I'll show you here.

Note: For the code samples below, you need to know how to insert them. Here's a tutorial on how to paste custom code into WordPress.

Theme Type 1: Removing Footer Links via Filters



Theme frameworks like Genesis for example, explicitly give you provisions to customize or remove footer links. For example, Genesis exposes a filter called "genesis_footer_creds_text" from which it's trivial to remove all footer credits. Just use the following code:

function remove_links_in_footer( $foot_links ) {
return '';
}
add_filter('genesis_footer_creds_text', 'remove_links_in_footer');


And you're done! If you have another theme framework like Thesis, the filter name will be something else. Thesis, for example, uses the filter "thesis_show_footer". Consult your framework documentation to see which filter you need, and then replace it in the code above.

Theme Type 2: Removing Footer Links in footer.php



In the second theme type, the links and credits are hard-coded into a file called "footer.php" in your theme. To remove it, we just need to remove these lines or comment them out.

Step 1: Create a Child Theme



But first, a warning. It's not a good idea to directly edit your theme files. If you do this, your changes will be erased as soon as the theme creators release an update. Due to this reason, the standard method to change theme files is to create a "child theme".

A "child theme" allows you to make changes that will not be erased when the parent theme is updated. Here's a step by step tutorial on how to create a child theme.

Step 2: Copy the footer.php File into your Child Theme



To create a child theme, you just need to copy the "style.css" file from the parent theme. But now, copy the "footer.php" file into the child theme folder as well so that it resides alongside style.css. In the screenshot below, I've created a child of the theme named "Gridiculous" and here's footer.php copied into the child folder:



Now you can edit this footer.php file without worrying about an update to the parent theme. Go into footer.php, and isolate the lines that print the credits. Either delete them or surround them with HTML comment tags like this:



Save your changes, and the credit links would have vanished.

Theme Type 3: Directly Edit Code in the Parent Theme



If you're unlucky, you'll be stuck with a theme like Verbosa that neither provides filters to remove the footer links, not allows you to easily modify files via child themes. In fact, these types of themes are deliberately constructed to make it as hard as possible to remove these links.

For such themes, you have no choice but to dig into the theme code and find out where exactly it's creating the links. For example, in the Verbosa theme there is a file called "core.php" in the "includes" folder that calls the action hook "cryout_master_footer_hook". This is the code that spits out the footer links.

To remove them, we need to comment out the line calling the function with two slashes // like this:



Only then will the links be removed. Creating a child theme won't work. The risk now of course is that when these themes receive an update, your changes will be lost, and you'll have to redo them all over. It's up to you to decide if you want to continue using these themes with all the associated headaches!

These three methods should cover all the use case scenarios for removing theme footer links in WordPress. Each theme is slightly different, and the instructions will vary. But you should have enough of an idea of how to proceed after reading these general guidelines.

Updated on: 10/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!