All WordPress themes like Twenty Seventeen, Twenty Sixteen and Twenty Fifteen have a footer message “Proudly powered by WordPress” displayed at the bottom of the site. This free footer message is an easy identification for hackers to find a WordPress site using default themes.
By default WordPress does not allow to remove this footer message. But you have the following two methods to hide or remove it from your site.
Hide WordPress Footer Message in CSS
WordPress displays the footer message “Proudly Powered By WordPress” using a CSS class named “site-info“. You can see this class by right clicking and inspecting the footer element.
Now that you can simply hide the footer using the “site-info” CSS class as explained below.
Login to your WordPress admin panel as an administrator and navigate to “Appearance > Editor” menu. Click on the “style.css” file located nearly at the bottom of right sidebar under “Styles” section. Add the following code at the end of “style.css” file and click on “Update File” button.
.site-info { display : none; }
It should look something like below:
View your site in a browser and the footer message “Proudly powered by WordPress” is hidden now.
Modifying Style Sheet Through Customizer
We have noticed most of the users disabled the theme editor option due to security reason. Also modifications done in the style sheet will disappear when you update the theme. Hence, you can update the “style.css” file using default WordPress customizer option instead of editor. Navigate to “Appearance > Customize > Additional CSS” and the code as shown below:
Problem in Hiding the Link with CSS
Above method will only hide the footer message and the actual message will always be there in the template PHP file. Also search engines like Google don’t like site owners to hide the links. So the better method is to modify the source PHP code in “footer.php” file to remove the footer.
Default themes up to Twenty Sixteen works in a similar manner but the Twenty Seventeen theme works differently. Here we will explain both cases.
Remove Footer Message in Twenty Sixteen and Below
Navigate to “Appearance > Editor” and select “footer.php” file from the right sidebar under “Templates” file. Locate the below block of code and remove it completely.
<div class="site-info"> <?php /** * Fires before the twentysixteen footer text for footer customization. * * @since Twenty Sixteen 1.0 */ do_action( 'twentysixteen_credits' ); ?> <span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span> <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a> </div><!-- .site-info -->
It should look something like below in the “footer.php” file:
Click on the “Update File” to save your changes. View your in a browser and the footer message should be removed now. You may need to clear browser’s cache for the changes to be effective instantly.
Remove Footer Message in Twenty Seventeen
On Twenty Seventeen theme, you need to remove the below code from “footer.php” file.
get_template_part( 'template-parts/footer/site', 'info' );
It should look like below:
Update the file and check you site on the browser, the free footer message should be removed.
Adding Custom Footer Message in Twenty Sixteen and Below
If you want to add your own custom message like “Copyright to My Own Site” then add the following code in “footer.php” file. This
<div class="site-info"> <?php do_action( 'twentysixteen_credits' ); ?> <a href="<?php echo esc_url( __( '<strong><span style="color: #ff0000;">http://myownsite.com/</span></strong>', 'twentysixteen' ) ); ?>"> <?php printf( __( '<strong><span style="color: #ff0000;">Copyright ©</span></strong> %s', 'twentysixteen' ), '<strong><span style="color: #ff0000;">My Own Site</span></strong>' ); ?></a> </div><!-- .site-info -->
It should look something like below after modifying the code:
The published site in browser will now have your custom footer displayed like below:
Adding Custom Footer Message in Twenty Seventeen
On Twenty Seventeen theme add the below code in your “footer.php” file.
<div class="site-info"> <?php echo '<a href="http://www.yoursite.com"> All Rights Reserved @ This is my Site Link</a>.'; ?> </div><!-- .site-info -->
It should like below in the editor:
And the published site on the browser should look like below:
You can add multiple links and decorate them by adjusting the CSS.
Is it Legal to Remove the Footer?
WordPress is an open source software distributed under GPLv2 or later. Similarly Twenty Seventeen and most other free themes are also distributed under GPLv2 or later. This is a General Public License allows to redistribute and modify the source code. Below is an extract from the readme.txt file part of the Twenty Seventeen download package from WordPress.org site:
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
So, in our opinion we do not see any issue in removing the footer code.
26 Comments
Leave your reply.