Archived topic
Menu in Copyright-Footer
2 replies · Started by Yannick on October 4, 2016
Hi,
I would like to add a "terms of use" menu\link on the right side of the Copyright-Footer.
Any ideas how to do this?
Also I would like to choose the color of the text and the color when it's hovered. This should be possible under "customise" > "colours" > "footer" once I am able to put a menu down there, or?
Thank you for your help :)
Hi Yannick,
You can add the required HTML directly into the Copyright text box in Customizer > Copyright if you are using the Copyright Add on or the GP Premium add ons. For example:
Copyright %copy% %current_year% <a href="http://yourdomain.com"> Your Site Name</a> | <a href="http://yourdomain.com/terms-and-conditions/">Terms and Conditions</a> | <a href="http://yourdomain.com/privacy-policy/">Privacy Policy</a>
If you are not using the add on(s), then you can do so with the following PHP:
add_action('after_setup_theme','generate_copyright_remove_default_message');
function generate_copyright_remove_default_message()
{
remove_action( 'generate_credits', 'generate_add_footer_info' );
remove_action( 'generate_copyright_line','generate_add_login_attribution' );
}
/**
* Add the custom copyright
* @since 0.1
*/
add_action('generate_credits','generate_copyright_add_custom_message');
function generate_copyright_add_custom_message()
{
?>
Copyright © <?php echo date("Y") ?> <a href="http://yourdomain.com"> Your Site Name</a> | <a href="http://yourdomain.com/terms-and-conditions/">Terms and Conditions</a> | <a href="http://yourdomain.com/privacy-policy/">Privacy Policy</a>
<?php
}
See this link for adding PHP:
https://generatepress.com/knowledgebase/adding-php-functions/
Then as you say, you will be able to style the text color and hover color in Customize > Colors > Footer
Cheers!
Lyle
Perfect, thank you Lyle!! :)