[Resolved] Sections set to disabled by default?

Home Forums Support [Resolved] Sections set to disabled by default?

Home Forums Support Sections set to disabled by default?

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #313589
    Collin

    Hello, when creating a new page/post I’d like to be able to have the checkmarks ticked by default so that all sections are de-activated by default. If I could predefine the boxes to be checked that’d save me a lot of time. Thanks!

    #313595
    Leo
    Staff
    Customer Support

    Hi Collin,

    Are you referring to the Sections add-on? It should be de-activated by default.

    or are you looking to disable a certain element for all pages?

    Let me know πŸ™‚

    #313598
    Collin

    I’m looking to disable certain/all elements for all posts/pages by default.

    #313599
    Leo
    Staff
    Customer Support

    Can you list out all the elements you are wanting to disable?

    Could be done with some CSS.

    #314115
    Collin

    All of them, actually. Do they each have their own CSS id/class?

    #314131
    Leo
    Staff
    Customer Support

    This CSS should cover all the elements that are in the Disable Element meta box:

    .site-header,
    #site-navigation,
    .navigation-clone, 
    #mobile-header,
    #secondary-navigation,
    .generate-page-header,
    .page-header-image,
    .page-header-image-single,
    .entry-header,
    .site-footer {
        display: none;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #314134
    Collin

    Does your Sections plug-in use CSS to function, similar to what you’ve provided here? I was under the impression it actually ensured the blocks of code for each section did not load (not just hide those sections with CSS).

    #314143
    Leo
    Staff
    Customer Support

    You are right. My bad…

    – Top bar: If no widgets are added, top bar wouldn’t load.

    – Header: https://docs.generatepress.com/article/generate_header/

    – Primary Nav: Customizer > Layout > Primary Navigation > Navigation Location > No Navigation
    https://docs.generatepress.com/article/generate_navigation_location/

    – Secondary Nav: Wouldn’t load if no secondary menu is added.

    – Featured Image/Page Header: Customizer > Layout > Page Header > Single Post Header Location > Hide

    – Content Title: https://docs.generatepress.com/article/generate_show_title/

    – Footer:

    add_action( 'after_setup_theme','tu_remove_footer' );
    function tu_remove_footer() {
        remove_action( 'generate_footer','generate_construct_footer' );
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know if you need more info.

    #314621
    Collin

    Thanks Leo, but this is assuming I want to make the change globally. I don’t want to do that. I only want to default to selecting all sections to be INACTIVE (instead of active) when I create a new page. Then I can choose which page sections to ACTIVATE each time instead of DEACTIVATING.

    #314624
    Leo
    Staff
    Customer Support

    Just making sure you are referring to the Disable Elements add-on and not Sections add-on?
    https://docs.generatepress.com/article/disable-elements-overview/
    https://docs.generatepress.com/article/sections-overview/

    I don’t actually think there is a way to do that currently. Will ask to Tom to confirm πŸ™‚

    #314625
    Tom
    Lead Developer
    Lead Developer

    Currently that’s not possible (well, it would require considerable programming).

    Disable Elements will be getting an overhaul to allow default values + desktop/tablet/mobile visibility soon πŸ™‚

    #314626
    Collin

    Yes, Disable Elements. Thanks

    #314628
    Collin

    Ok, thanks for the update Tom. I will survive clicking them all each time for now πŸ˜‰

    #314630
    Tom
    Lead Developer
    Lead Developer

    No problem! The defaults/responsive controls are pretty high up on my to-do list πŸ™‚

    #500626
    Ian

    Was this implemented?
    My desire would be to set some defaults in the Customizer (e.g. footer and content title elements disabled) and then have every new page I generated thereafter have those settings, not requiring me to click them every time I create a new page. In other words, to have a basic page template that’s not the norm.
    On a related note, if I’d created 20 pages with those defaults and then needed to have the content title activated in all of them, is there some universal way to do that once and have it affect all 20 pages?

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