[Support request] Global – Disable Elements

Home Forums Support [Support request] Global – Disable Elements

Home Forums Support Global – Disable Elements

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #368368
    TROY

    I love how simple your theme is to navigate. Planning on using it with Elementor. However, I was hoping there would be a global way to disable elements (not just on a page-by-page) basis, and then ‘enable’ what I want.

    e.g. I want the Header and Content Title disabled on all pages, except 1.

    Is this an option? If not, even a global disable of Header and Content Title on pages would be great.

    In addition, I was hopeful there was a global way to make all pages full-width.

    Thanks!

    #368378
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Glad you’re enjoying the theme!

    This functionality is planned for GPP 1.6 – a total Disable Elements re-write.

    For now, it’s possible to do this with some code.

    add_action( 'after_setup_theme', 'tu_global_disable_elements' );
    function tu_global_disable_elements() {
        if ( is_page() ) {
            apply_filters( 'generate_show_title', '__return_false' );
            remove_action( 'generate_header','generate_construct_header' );
        }
    }

    To make all pages full width, you can just make your container width a really high value in Customize > Layout > Container.

    Let me know if you need more info πŸ™‚

    #368666
    TROY

    Thanks. I added this using the Simple CSS plugin. Sorry if i missed something, but it did not seem to disable the header and title on all pages. If there is a support document I should read, please send it my way πŸ™‚

    I also noticed that the disable feature does not seem to work at all on the default wordpress page set for Blog posts.

    Thanks for the tip of full-width. Might be worth adding this tip on the design for people who are using web builders.

    Again, thank you for your time and support!

    #368758
    Leo
    Staff
    Customer Support

    That code is PHP so try one of these methods: https://docs.generatepress.com/article/adding-php/

    Metaboxes don’t work on index pages (blog, archive) by WordPress default.

    #1132313
    Charissa

    Hello, I see where GP is supposed to allow for global disabling of various elements, ie. header, etc…but even after purchasing GP Premium for that sole reason and enabling the Disable Elements I cannot find anywhere in Layout the Area Called Disable Elements allowing me to do so? Did GP release this feature then take it away? Even in GP support it says you can do this? What is going on?
    https://docs.generatepress.com/article/disable-elements-overview/?ref=1773
    (this page shows a DISABLE ELEMENTS option under LAYOUT. That does not show up in my installation even after installing GP Premium, activating, and enabling that element.

    https://freshvanroot.com/blog/2019/how-built-site-generatepress-elementor/
    How can you disable certain things to get displayed in GP?

    For our site, we do not want any sidebars, headers, site titles and so on displayed on pages or posts. GP provides an easy way to disable certain elements on page level or setting default for the whole site.

    #1132335
    Tom
    Lead Developer
    Lead Developer

    Hi Charissa,

    In order to use Disable Elements site-wide, you need to create a Layout Element: https://docs.generatepress.com/article/layout-element-overview/

    The Layout Elements works along with the Disable Elements module and allows you to use the Display Rules to apply your settings on the Entire Site (or wherever you want).

    Hope this helps! πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.