Archived topic
GP Hooks Code for Copyright Current Year
8 replies · Started by Mary Pearson on February 27, 2015
I'm having to use GP Hooks for content that appears below the Generate Press Copyright position. For that reason I need to enter the copyright info in another hook that is closer to the bottom of the page.
When I enter Copyright %current_year% in the Hooks it shows up exactly as I've entered it. Is there a code that I can use in the GP Hooks to add the copyright with current year in a hook which is at the very bottom.
Thanks Tom!
Hi Mary,
Try this:
<?php echo date('Y'); ?>
And make sure "Execute PHP" is checked.
Hi Tom,
Thanks for your terrific add-on for the copyright area in the footer. My client wants to add her site map and Blog link in the "black bar" area as well.
I think I read something about being able to do this with shortcodes and HTML but now I can't find the instructions for that. I have read the knowledge base and will try to add shortcodes for the links but I'm not a WordPress guru.
If you could send me a link to the instructions, it would be greatly appreciated. Have a nice day.
PERFECT!!!!! Many, many thanks again Tom!
@Cheryl
You can use HTML in the Copyright area to build links like this:
<a href="http://google.com">Link to Google</a>
I'm trying to add an internal page link to the copyright area, ie: privacy policy page
Using your method above
a href="http://google.com">Link to Google
I'm getting this output link: https://www.mywebsite.com/"http://google.com/"
which of course produces Page not found page.
What is the correct html code to use for linking to an internal page?
I got it to work using index.php?page=## but couldn't add the target _blank bit to open in new window or tab.
Hints?
Hi Mike,
This should be the correct HTML you are looking for:
<a href="https://PRIVACY-PAGE-LINK-HERE" target="_blank">Privacy</a>
If you need additional assistance, can you open a new topic? Thanks :)
Sorry, but that code doesn't work. I got it to work using:
%copy% %current_year% (My Website Name), ALL RIGHTS RESERVED<br>%current_year% <a href=\"index.php?p=246\" target=\"_blank\"> Privacy Policy</a>
Glad you got it working :)