- This topic has 13 replies, 2 voices, and was last updated 3 years, 1 month ago by David.
July 29, 2018 at 12:59 pm #635453Stephen
I would like to display a text link only on the site Home page under the footer area.
Is this best achieved with hooks or is there another way to do it?
I’m using a child theme.
SteveGeneratePress 2.1.3GP Premium 1.6.2July 29, 2018 at 4:21 pm #635554DavidStaffCustomer Support
You could add the link to the Copyright field in the Footer, it accepts HTML.
Or you could add it in the After Footer Content Hook e.g.
<div class="site-info"><a href="url">My link</a></div>
site-infoclass will style it the same as your copyright 🙂July 30, 2018 at 7:26 am #635999Stephen
I want the link to appear below the footer so I need to add a hook. I read the hook should go in the functions file in the child theme. How do I inform the theme to only apply the hook to the Home page?
SteveJuly 30, 2018 at 7:34 am #636008DavidStaffCustomer Support
You can use the GP Hooks instead of writing the function and wrap your content in a conditional tag, just make sure Execute PHP is checked:July 30, 2018 at 8:17 am #636133Stephen
Looks great, I will try that and break everything 😉
I’ll post back when everything goes wrong 🙂
SteveJuly 30, 2018 at 11:31 am #636343DavidStaffCustomer SupportSeptember 6, 2018 at 2:16 am #670113Stephen
I used an Element to insert a hook under the site footer for my text, but unfortunately the new text/link and hook area do not follow the themes settings i.e. font, link or page bg colour. The hook bg area is grey and the font to large.
How do I resolve this issue please and where do I insert the code, in the CSS file or in the Element Edit window?
SteveSeptember 6, 2018 at 3:09 am #670130Stephen
I should mentioned I’m using Elementor and GP Pro.
ThanksSeptember 6, 2018 at 7:06 am #670262DavidStaffCustomer Support
are you able to add it to the site so i can have a look and provide the solution?
You can just add the link into the copyright bar….. just separate the copyright and link with a
<br>tag to create a new line. Let me know.September 6, 2018 at 9:14 am #670435Stephen
I did have the text/link in the copyright area but unfortunately that then shows on all pages. I just want the link on the Home page.
I’ve added the text/link, thank you.
SteveSeptember 6, 2018 at 9:18 am #670441Stephen
BTW, I’m using a child theme.
On a side note, I’ve been watching videos, reading and playing with Elements all day. Elements is quite simply amazing……………..September 6, 2018 at 10:17 am #670473DavidStaffCustomer Support
Aah understood, yes Elements is something very special 🙂
So add this HTML to your hook:
<div class="site-info"> <div class="inside-site-info grid-container grid-parent"> Add your text / HTML here </div> </div>
This will use the same styling as the Site-infoSeptember 6, 2018 at 11:00 am #670529Stephen
That worked for the text 🙂 The text was aligned centre and the same size font as the footer copyright. However, when I made the text into a link the text disappeared. A quick visit into the customiser – colour – footer and all is well.
Thank you very much 🙂
We didn’t break anything 😉September 6, 2018 at 11:02 am #670530
- You must be logged in to reply to this topic.