256 Kilobytes

Answers in Content-Management Systems | By Some Guy

Published 1 week agoSat, 06 Apr 2019 07:02:36 -0700 | Last update 1 week agoSat, 06 Apr 2019 07:09:32 -0700

98 views, 0 RAMs, and 1 comment

Tags: Wordpress, GeneratePress

Profile Photo - Some Guy Some Guy
🗎 3223 🗨 41 🐏 31
Subscriber

I set up a GeneratePress site, but want to remove the "Powered by GeneratePress" from the site's footer. How can I do this as easily as possible?

I read Hash Brown's review of GeneratePress and saw that it says that this is one of the GeneratePress Premium add ons:

  • Copyright - Add/Modify copyright text in your footer without changing your wp-footer.php file. Very quick and easy, and allows you to set the year so it will auto-update.

But do you need to have premium to just remove the footer copyright without that plugin? Do I need to buy the premium version to do this?

Thanks in advance.

Download more RAM. 🐏 ⨉ 0 Posted by Some Guy 1 week ago

Edit History

• [2019-04-06 7:02 PDT] Some Guy (1 week ago)
🕓 Posted at 06 April, 2019 07:02 AM PDT

This is a patsy account used by the 256 Kilobytes staff to seed content. 

Profile Photo - August R. Garcia August R. Garcia LARPing as a Sysadmi... Portland, OR
🗎 104 🗨 620 🐏 116
Site Owner

You do not need the premium version to remove the footer, although it is easiest to remove the footer in the premium version. Click this link and scroll to the section labeled "copyright" for a video tutorial that will show you how to do that with GeneratePress Premium.

To do this in the standard version of GeneratePress, there are two possible standard ways:

Remove the Footer Code from the PHP Source FIle

  1. Go to Appearance > Editor and then open inc/structure/footer.php, which should look something like this.  
  2. Find the part of that file's code that is used to generate the footer and comment out the line that starts with "echo" and then save the file. It should look something like this:
<?php
// BEFORE
if ( ! function_exists( 'generate_add_footer_info' ) ) {
	add_action( 'generate_credits', 'generate_add_footer_info' );
	/**
	 * Add the copyright to the footer
	 *
	 * @since 0.1
	 */
	function generate_add_footer_info() {
		$copyright = sprintf( '<span class="copyright">&copy; %1$s %2$s</span> &bull; %4$s <a href="%3$s" itemprop="url">%5$s</a>',
			date( 'Y' ),
			get_bloginfo( 'name' ),
			esc_url( 'https://generatepress.com' ),
			_x( 'Powered by', 'GeneratePress', 'generatepress' ),
			__( 'GeneratePress', 'generatepress' )
		);
		echo apply_filters( 'generate_copyright', $copyright ); // WPCS: XSS ok.
	}
}
?>

<?php
// AFTER
if ( ! function_exists( 'generate_add_footer_info' ) ) {
	add_action( 'generate_credits', 'generate_add_footer_info' );
	/**
	 * Add the copyright to the footer
	 *
	 * @since 0.1
	 */
	function generate_add_footer_info() {
		$copyright = sprintf( '<span class="copyright">&copy; %1$s %2$s</span> &bull; %4$s <a href="%3$s" itemprop="url">%5$s</a>',
			date( 'Y' ),
			get_bloginfo( 'name' ),
			esc_url( 'https://generatepress.com' ),
			_x( 'Powered by', 'GeneratePress', 'generatepress' ),
			__( 'GeneratePress', 'generatepress' )
		);
		//echo apply_filters( 'generate_copyright', $copyright ); // WPCS: XSS ok.
	}
}
?>

This will completely remove the footer from your site's source code, which is the best solution (besides upgrading to premium).

CSS Hack

The footer's HTML source looks something like this:

<footer class="site-info" itemtype="https://schema.org/WPFooter" itemscope="">
  <div class="inside-site-info grid-container grid-parent">
    <div class="copyright-bar">
      <span class="copyright">© 2019 Your Website</span> • Powered by <a href="https://generatepress.com" itemprop="url">GeneratePress</a>
    </div>
  </div>
</footer>

You can hide this with CSS by adding this line of CSS:

footer#site-info div.copyright-bar { display:none; }

This solution will hide the copyright bar, although it will still technically be in the page source, just hidden from humans (which is generally good enough).


Related thread for a different WP theme:

Download more RAM. 🐏 ⨉ 0 Posted by August R. Garcia 1 week ago

Edit History

• [2019-04-06 7:28 PDT] August R. Garcia (1 week ago)
🕓 Posted at 06 April, 2019 07:28 AM PDT

The CIA wants all code in the cloud under their lock and key. They want to ban compilers and make people think HTML is computer programming. - Terry A. Davis

Post a New Comment

To leave a comment, login to your account or create an account.

Do you like having a good time?

Read Quality Articles

Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

Make Some Money

Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.

Register an Account
You can also login to an existing account or recover your password. All use of this site is subject to terms outlined in the terms of service and privacy policy.