- This topic has 3 replies, 2 voices, and was last updated 5 months, 2 weeks ago by
David.
-
AuthorPosts
-
October 7, 2022 at 11:08 am #2366529
Carolyn
I have a header element and layout being applied to all pages. But there are specific pages that I want to essentially be a full-width builder page (a blank slate) – so I don’t want the element applied there. In other builds, I have been able to disable the content title and have full width content container, but it seems like the only way to get a blank slate is to make an exception in display rules on the elements. I’d rather not do that every time I create a builder-style page. Is there a way around this? Like a way to use display rules to make an exception to everything with “full width” content container selected in the page options? Or a way to disable custom elements like the “disable elements” checkboxes in the page options?
October 8, 2022 at 5:50 am #2366988David
StaffCustomer SupportHi there,
one method i use is the following PHP Snippet:
// Generate custom taxonomy for Element Display Rules function element_control_custom_tax() { register_taxonomy( 'element-controls', array( 'post', 'page' ), array( 'label' => __( 'Element Controls' ), 'rewrite' => array( 'slug' => 'element-controls' ), 'hierarchical' => true, 'show_in_rest' => true, ) ); } add_action( 'init', 'element_control_custom_tax' ); // Exclude custom taxonomy from wp_sitemaps add_filter('wp_sitemaps_taxonomies', function( $taxonomies ) { unset( $taxonomies['element-controls'] ); return $taxonomies; } );
What it does is register a Custom Taxonomy called
Element Controls
for Posts and Pages.
Its only visible on the backend.With it you can create your own custom Terms, eg.
Full Width Pagebuilder layout
And you can use the Element Control terms for your Element Display Rule Locations and Exclusions.Added bonus is that the Element Control admin view will allow you to see all terms and the posts / pages that are using them.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 11, 2022 at 4:45 pm #2370462Carolyn
Very cool idea. Will try it out! Thanks.
October 12, 2022 at 4:37 am #2370875David
StaffCustomer SupportYou’re welcome 🙂 Let us know how you get on.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.