GeneratePress: Custom Footer Copyright
Replaces the "Built with GeneratePress" footer line with your own copyright text and the current year, without the premium plugin.
Opens WPIDE on
Code
// Footer text. {year} and {site} are replaced.
$wpide_gp_copyright = '© {year} {site}. All rights reserved.';
add_filter( 'generate_copyright', function () use ( $wpide_gp_copyright ) {
$text = str_replace(
array( '{year}', '{site}' ),
array( wp_date( 'Y' ), esc_html( get_bloginfo( 'name' ) ) ),
$wpide_gp_copyright
);
return wp_kses_post( $text );
} );
Notes
Use {year} and {site} as placeholders in the text.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.