remove footer
-
‘ve done this:
That’s a neat theme and very organized. But changing the copyright properly requires a little coding.
First create a child theme for Clean Retina. Put the child theme’s style.css file in themes/clean-retina-child.
/*
Theme Name: Clean Retina Child Theme
Author: Self-Help WordPress User
Template: clean-retina
*/@import url(“../clean-retina/style.css”);
The footer for that theme is added via this action in the parent theme:add_action( 'cleanretina_footer', 'cleanretina_footer_info', 25 );
You want to remove that action and add your own instead. To do that in your child theme directory create a blank functions.php file and add these lines to it.<?php // Remove old copyright text add_action( 'init' , 'mh_remove_copy' ); function mh_remove_copy() { remove_action( 'cleanretina_footer' , 'cleanretina_footer_info ', 25 ); } // Add my own copyright text add_action( 'cleanretina_footer' , 'mh_footer_info' , 25 ); function mh_footer_info() { $output = '<div class="copyright">'.'Copyright ? [the-year] [site-link] Powered by: SUPER MARTIANS FROM MARS! '.'</div><!-- .copyright -->'; echo do_shortcode( $output ); }
Which on your installation should produce something like
Copyright ? 2012 B .Dinelli for Hair Powered by: SUPER MARTIANS FROM MARS!
You can read about adding and removing actions in child themes at this site.https://themeshaper.com/2009/05/25/action-hooks-wordpress-child-themes/
Hope that helps.
But this code:
<?php // Remove old copyright text add_action( 'init' , 'mh_remove_copy' ); function mh_remove_copy() { remove_action( 'cleanretina_footer' , 'cleanretina_footer_info ', 25 ); }
doesn’t work, I mean it inserts my copyright, but still doesn’t remove the old one.
Thanks
[Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]
- The topic ‘remove footer’ is closed to new replies.