- This topic has 10 replies, 2 voices, and was last updated 4 years, 5 months ago by
Leo.
-
AuthorPosts
-
December 29, 2018 at 4:25 pm #768807
Brian
I want to add an area just above the footer that will be common to all pages. It will be full-width and maybe twice the height of the footer. How is this done? Is it a modification to the footer or is it a section in the content?
I plan to have a solid background color with text in this area.
I have an element for layout applied to all pages. I’m guessing changes would be done in the layout element. I tried changing footer widgets to 1 but didn’t like the effect.
BTW, I am using Beaver Builder as my page builder.
Thanks,
BrianDecember 29, 2018 at 4:26 pm #768808Leo
StaffCustomer SupportHi there,
Hooks Element should be what you are looking for:
https://docs.generatepress.com/article/hooks-element-overview/You can see where they are here:
https://docs.generatepress.com/article/hooks-visual-guide/Let me know if this helps π
December 29, 2018 at 4:38 pm #768815Brian
Thanks, I’ll check this out. Appreciate the fast response!
Brian
December 29, 2018 at 5:13 pm #768828Brian
I was able to add some simple text using a hook element. If I want formatted text with a background do I add either html or CSS code to the hook element code section?
Just now I noticed the section above the footer on this forum web page. Is this done with a hook and are all the links in code in the hook definition?
Thanks,
December 29, 2018 at 5:20 pm #768831Leo
StaffCustomer SupportYup you can add any HTML inside the hooks.
The section above footer/copyright section are the footer widgets:
https://docs.generatepress.com/article/footer-widgets/If you can explain or show what you are trying to achieve, I can point you to the right direction π
December 30, 2018 at 11:49 am #769370Brian
Hi Leo,
I tried this code in my hook element (before the footer) and the color looked light blue and the code displayed on my website. Does the before_footer ID need to be in the CSS code?
background-color: DimGray;I’m not sure yet of the exact content I’m going to finally use but my intent is to have some text and a call to action.
Thanks
December 30, 2018 at 1:22 pm #769423Leo
StaffCustomer SupportTry something like this in the hooks content:
<div class="my-before-footer-content> my content </div>
Then you can target with CSS:
.my-before-footer-content { background-color: #000; }
You can learn more about HTML like this here:
https://www.w3schools.com/html/html_classes.aspThey aren’t theme specific π
December 30, 2018 at 3:57 pm #769500Brian
Sorry to bother you again on this. I added this to my before_footer hook:
<h2> Hello </h2>Then I added this to Simple CSS and saved it:
.my-before-footer-content {
background-color: lightblue;
}I don’t see anything change on my website in the before-footer. It’s all white as is the the page body.
When I use ctrl-U and examine the site code I see the above hook and CSS code. (TremaineConsultingGroup dot com)What am I missing? Thanks for your patience π
December 30, 2018 at 4:09 pm #769505Leo
StaffCustomer SupportYour h2 is not wrapped with the
<div>
with the right class name like I have it above.And also I’m not sure the “lightblue” is a valid command. You might want to use hex color code like I did.
You can try something like this:
<div class="my-before-footer-content> <h2>Title</h2> </div>
With this CSS:
.my-before-footer-content { background-color: #000; } .my-before-footer-content h2 { color: #fff; }
I would recommend the lessons here if you want some introduction to HTML and CSS:
https://www.codecademy.com/catalog/language/html-cssLet me know if you need more info π
December 30, 2018 at 8:56 pm #769598Brian
Hi Leo,
I have it working now. In your example above for the hook code you dropped the trailing ” and I copied it verbatim. This was why it wasn’t displaying for me. I’m halfway through the html course and part way into the CSS course. Thanks for suggesting those. It’s been a long while since I used html code and I’ve never used CSS code.
Thank you for your help. I haven’t decided on the final content but I have a full-width DimGray area above the footer with a pad of 1px on all sides and it applies to all pages
December 31, 2018 at 10:23 am #770029Leo
StaffCustomer SupportSounds good.
Let me know if you need help with the final content once you’ve decided π
-
AuthorPosts
- You must be logged in to reply to this topic.