Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rodrigo-gpereira/f643068961d861922f2b7dbbf28b49af to your computer and use it in GitHub Desktop.
Save rodrigo-gpereira/f643068961d861922f2b7dbbf28b49af to your computer and use it in GitHub Desktop.
This functions hide Elementor Header and Footer on special templates types like as Container and Section for improvement your workflow when you edit templates
@rodrigo-gpereira
Copy link
Author

When you add a template to Elementor page, you can select editor mode for template

elementor-page-with-container-template

But when you access editor for container or section block models of header and footer are loaded on editor

elementor-container-template-with-header_and_footer

This code is designed to work with Elementor Pro, a popular WordPress page builder plugin. It aims to conditionally remove the header and footer from specific Elementor templates.
Uses reflectionClass to access the private locations queue property of the $location_manager object and remove the header and footer items

elementor-container-template-without-header_and_footer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment