Archived topic
Same content showing on all pages - Hook is solution?
5 replies · Started by fabiosilva on June 18, 2019
I have a content section (with content and full-width background image) that needs to appear throughout the site.
Instead of creating page by page (copy and paste), it's possible create any wook element to make this appear on all website?
Thank you
Hi there,
a Hook is the best method for adding content throughout the site.
How is this 'content' created ? As it will need to be added using HTML to the Hook. Let me know
Hi, David,
For example, I've some HTML content. Basically, I' need to put this HTML code inside a full width container (and limited interior container) with background color.
Maybe there is some specific code to do this.
Thank you.
Yes, this code give you the basics:
<div class="custom-container">
<div class="grid-container">
<!-- your HTML in here -->
</div>
</div>
The outer DIV custom-container can be full width. You can give it whatever class you want for stlying.
The inner div grid-container class is what GP uses to set the container width set in the customizer.
You can see the various hooks here, and which ones are full width.
GOD! It's so simple!
Thank you!
Glad to be of help.