- This topic has 5 replies, 2 voices, and was last updated 7 years, 10 months ago by
David.
-
AuthorPosts
-
May 19, 2018 at 5:10 am #579420
Leon
Hello Tom,
I’m trying to add below code to the footer area, ideally right after my Copyright Content as it will only be a small image shown.
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1273741166'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s22.cnzz.com/z_stat.php%3Fid%3D1273741166%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>Problem is: when I add it from the customizer, in the box of the copyright content, it will mess up the page. If I use the wp-footer or after footer content hook, it will actually show up below the copyright area and align all the way left in the new line.
Could you please guide me on how to fix this?
Thank you
LeonMay 19, 2018 at 5:34 am #579426David
StaffCustomer SupportHi Leon,
you can use GP Hooks:
https://docs.generatepress.com/article/hooks-overview/
Add the code to the After Footer Content Hook – if you want the ‘icon’ to appear after the copyright on the same line you could add this:
<div class="grid-container" style="text-align: center;"> © <?php echo date('Y'); ?> My Copyright <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1273741166'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s22.cnzz.com/z_stat.php%3Fid%3D1273741166%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script> </div>Make sure you check execute PHP on the hook if you use this code
May 19, 2018 at 7:37 pm #579810Leon
Hi David,
Thank you for the help. This doesn’t solve the problem I was facing. If I use the code and leave the copyright section empty, the default GP copyright will be shown.
However, I’ve made it the same background color and center aligned the content. Reserved what I have in the copyright area from the customizer and it looks ok now.
Thank you
LeonMay 21, 2018 at 4:24 am #580620David
StaffCustomer SupportHi Leon,
glad you have it resolved, just so you know you can just add a space to the copyright section to leave it blank
May 22, 2018 at 9:19 pm #582281Leon
Thank you David!
May 23, 2018 at 3:41 am #582455David
StaffCustomer SupportGlad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.