×
  • Themes
  • Support
  • Blog
  • Log In
  • Sign Up

NiceThemesNiceThemes

  • Support
  • Themes
  • Log In
  • Sign Up
Menu

Smart Documentation

Documentation with in-depth articles for Smart WordPress Theme.

Smart Documentation / FAQ / Changing the copyright text

Changing the copyright text

Right after you install one of our themes, the default copyright text of your site will be vey similar to “Name of the Theme by NiceThemes – Powered by WordPress”

So let’s suppose you want to change that text to something like “My Awesome Business © 2015”. Well, there’s a couple of ways to do this:

Theme Options

  1. In your WordPress Dashboard, go to NiceThemes > Theme Options, and click on the Footer tab. You’re gonna see the following options:
    Footer Options
  2. Write your text inside inside the “Custom Copyright Text” box and check the “Enable Custom Copyright” option.
    Footer Options
  3. Click the “Save Changes” button. Now you should see your custom copyright text in the footer of the website.
    Custom copyright text

Coding

The PHP function that prints out the copyright text is called nice_copyright(). If you’re using a Child Theme, you can override that function by declaring it in your functions.php file doing something like this:

<?php
function nice_copyright() {
    echo 'My Awesome Business © 2015';
}

While this is a powerful method, it also might be a double-edged sword, since modifying the copyright text by overriding `nice_copyright()`, depending on how you do it, may nullify the copyright settings under Theme Options and render them unusable.

A more flexible way to do this, that works even if you’re not using a Child Theme, is making use of the nice_copyright_default_args. This method will change the default copyright text while still allowing you to modify it through Theme Options. The code you’re gonna want to have in your functions.php file will look similar to this:

<?php
add_filter( 'nice_copyright_default_args', 'my_custom_copyright_filter', 20 );
/**
 * Set the copyright arguments for the function nice_copyright()
 */
function my_custom_copyright_filter( $args ){
	// Initialize text string.
	$text = '';

	// Check if the usage of a custom copyright is enabled in Theme Options.
	$custom_copyright_enable = get_option( 'nice_custom_copyright_enable' );

	// If the custom copyright is enabled, then use it.
	if ( ! empty( $custom_copyright_enable ) && nice_bool( $custom_copyright_enable ) ) {
		$custom_copyright_text = get_option( 'nice_custom_copyright_text' );

		if ( ! empty( $custom_copyright_text ) ) {
			$text .= $custom_copyright_text;
		}

	} else { // If the custom copyright is not enabled, then create our own default text.
		$text = 'My Awesome Business © 2015';
	}

	// Add the copyright text to the copyright arguments and return them.
	$args['text'] = $text;

	return $args;
}

If you want more information about how filters work, you can read this article in the WordPress Codex.

These are very simple ways to modify the copyright text via PHP, but you can add any kind of additional complexity, depending on your needs and your knowledge of the language.

FAQ Theme Configuration

Related Articles

  • One Click Demo Install Problems
  • Importing demo content
  • Changing the Logo Link
  • Changing the logo of your Theme
  • Using the Gallery template
  1. Theme Options
  2. Coding

NiceThemes

  • About
  • Blog
  • Contact

Support

  • Support Center
  • Knowledge Base
  • Support Forums

Products

  • Themes

Join Us On

Curated with lots of    by your friends at NiceThemes™

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server