Archived topic
How to "Hook" Elementor Sections?
5 replies · Started by Puneet on March 16, 2020
Hello,
I am trying to use Elementor Theme Builder with GP and experiencing some road blocks.
I have created a "section" using Themer Builder and was wondering how can I hook it "Before Footer"?
Prior to GP, I have used Page Builder Framework which provides an option for "Location" in Elementor that can be used to add the section to the desired hook.
Thanks!
Hi there,
you can add the Elementor Template shortcode to the site using the GP Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
If you select the footer hook from the list it will give you the option to remove the theme footer.
Hi David,
Thanks for the answer.
I was wondering if there's any reason why GP doesn't leverage "Theme Locations" API provided by Elementor? https://developers.elementor.com/theme-locations-api/
It would simplify the workflow so much as the hooks can be assigned from within Elementor Panel itself. https://tinyurl.com/wt7g532
Our ethos is to keep the theme unburdened of 3rd party integrations. As it can lead to unwanted or obsolete code and additional support/development needs outside of our core focus.
For Header, Footer, Single etc Theme Builder Templates then Elementor will automatically replace the Themes templates.
Thanks, David. I understand the thought behind this.
It was a quick fix, I wrote a simple function to get this working.
Here's the code in case anyone needs it :)
https://gist.github.com/psahalot/42c7f90fa99c31fad3b8d1e9cf6614fc
Thanks for sharing this :)