Archived topic
Using "Before Footer" Hook
5 replies · Started by scottyonthepipes on September 11, 2014
Since I'm not a code guy, using the "before footer" hook is appealing to me for adding some text and a link right above the footer. However, when I do that, the text left justifies itself to the side of the browswer. I want it to left justify itself the the left side "margin" of my main content. The link I want to insert looks like this:
<h4><span style="color: #000080;"><span style="color: #000080;">Click to get posts by email</span></span></h4>
What do I lack to get it to line up right? Thanks for helping an ignorant person!
As a bonus, is there a way to make this appear only on post pages and not on the primary blog page? Always, with me, questions.
Try this:
<div class="grid-container grid-parent">
<div class="page-header">
<h4><span style="color: #000080;">Click to get posts by email</span></h4>
</div>
</div>
I added the page header class in there to mimic your background color and content spacing.
Let me know if that helps :)
It helped tremendously! My only difficulty was that your code eliminated the link from my text, and I'm NOT code savvy. However, we have a saying in my family, "even a blind hog finds an apple every once in a while."
So, this blind hog experimented a little between your version and mine, and I came up with this:
<div class="grid-container grid-parent">
<div class="page-header">
<h4><span style="color: #000080;"><span style="color: #000080;">Click to get posts by email</span></h4>
</div>
</div>
AND IT WORKED! I'm not sure why...but it works! THANKS!
Hello,
I want insert a span class to h4 on widget, how i can do this ?
Thx
You're wanting to replace the h4 of the widget title with a span instead?
If so, this should help: https://generatepress.com/forums/topic/changing-sidebar-h-tags/#post-143222
Perfect Tom :)