How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php, and without creating a child theme?
I’m looking for a php command, such as add_action
, remove_action
, add_filter
, or something of that sort.
I’m not looking for CSS to hide the footer.
I don’t want to modify any of the theme files other than functions.php
Is this possible? For reference the code in the footer that is creating this is below.
<div id="site-generator">
<?php do_action( 'twentyeleven_credits' ); ?>
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyeleven' ) ); ?>"
title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"
rel="generator">
<?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a>
</div>
There are 3 methods.
Somewhat weird but since this text is internationalized you can filter the output. This is just an example to remove the text, the link is still present in the source.
Use jQuery (or javascript)
$('#site-generator').remove();
Create a child theme and just comment out the code or delete it.