If you are interested in removing the “Powered by WordPress” credit from the footer of your web site, this tutorial will go through the steps on how to do that.
In this tutorial, you will be introduced to:
- How to remove or edit the credit link from your theme’s template files
- How to locate the CSS ID or Class for the footer credit link
- How to use Custom CSS to hide the footer credit link
- Why using Custom CSS is a preferred solution
First, let’s see how to edit template files. You may not want to actually perform these steps however, as the more preferred solution will be demonstrated below. I am just including this section for completeness.
- From within your WordPress Dashboard, go to Appearance, then Editor.
- From the right side, locate the Template Footer or footer.php file, and click on it.
- Search for the code that displays the footer credit link. This could differ depending on the theme. In the theme in the demonstration, Twenty Seventeen, it does a call to a different file, which is accessible by FTP. It uses the WordPress function get_template_part to call the other file.
- You can do what is called “commenting out” the function to prevent it from calling the other file. To do that, put 2 slashes just before the get_template_part function, and click the Update File button.
- Now, check the web site to see that the footer credit link has been removed.
For reasons discussed in the final section, you may want to undo the steps performed above, and use the approach demonstrated next.
Before we remove the link with CSS, let’s first see what CSS container it is in. I am using Google Chrome to perform these steps. The steps will differ for other web browsers.
- First, view the front end of your web site in your web browser.
- Next, scroll down to the footer credit section.
- Right click on the credit link, and click Inspect.
- Look for the most immediate HTML container that is enclosing the footer credit. This could be a div, span or other tag. In the theme in the demonstration, Twenty Seventeen, a div tag is being used.
- Check whether the CSS that styles this container is a class or an ID. In the demo, a CSS class is being used.
- Make note of the name of the class or ID. In the demo, the class name is site-info.
Now, let’s add some Custom CSS to hide the footer credit from the web site.
Since version 4.7 of WordPress, a Custom CSS tool has been added to the Theme Customizer. Prior to that, JetPack, a Child Theme, or a 3rd party solution could have been used.
We will use the Theme Customizer to edit the CSS.
- From within your WordPress Dashboard, go to Appearance, then Customize.
- Click on Additional CSS.
- Put your cursor on a new empty line.
- If your theme is using a class for the footer credit container, start with a period or dot. If the theme is using an ID, start with a hashtag or pound symbol. Then type the name of the class or ID, then press the spacebar and open a squiggly bracket.
- Now type: display, a colon, none, a space, an exclamation mark immediately followed by the word important, immediately followed by a semicolon.
- Add in a space, then close the squiggly brackets.
- Check the Live Preview tool on the right side.
- If the desired result is achieved, click the Save & Publish button near the top left.
Using Custom CSS in this way is definitely the preferred choice.
It used to be, and by some still, suggested to modify the core theme files directly.
Well, this has the same implications as editing core plugin and WordPress core files.
Any time the core files are updated, then you will need to manually apply your changes again. This can become a maintenance burden before long.
Another choice is to avoid updating the core files, but then you would miss out on feature updates, as well as important security and bug fixes.
In the past, creating a Child Theme may have been a good choice. In general though, a Child Theme only had value when wanting to edit the CSS, and in some cases for adding custom functionality.
Using a Child Theme to override core template files, such as overriding footer.php, inherited some of the same concerns as editing the core files of the Parent Theme.
Also, unless the custom functions are very specific to the theme, it’s often better to create a custom plugin instead when needing to add custom functions.
At any rate, because JetPack, and now WordPress since version 4.7, offers native support for adding custom CSS, this is certainly the preferred route for the reasons discussed above. Plus, it’s a lot simpler.
With that said, I hope that you reconsider hiding the WordPress footer credit, and perhaps use this education for different types of customization you would like to perform to your theme 🙂