Globally Remove Page Titles

Home Forums Support Globally Remove Page Titles

Home Forums Support Globally Remove Page Titles

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #225294
    Bruce

    Hello Tom,

    I know that there is a metabox that allows us to disable elements (such as page titles) selectively, page by page.

    If we are using a page builder, there is a good chance that we would want the page titles disabled globally, and then add them back individually if we need to.

    Would it make sense to add a setting somewhere to globally disable elements (check them by default)? Then if they wanted to remove the disable of an element for a page, they could just uncheck it in the metabox for that page?

    Hope this makes sense. πŸ™‚

    #225335
    Lyle

    Hi Bruce,

    Thought I would jump in here with a suggestion as I too had been looking into a way to do so as I always use a page builder, either Beaver Builder or lately, Elementor. And as you mention, I always have to remember to check the Disable Content Title.

    Now there may be a more elegant (read: proper) way to do so, but this is what I have been doing:

    – install Tom’s fantastic Simple CSS plugin; as well as a standalone CSS editor and inclusion in the Customizer, it places a CSS meta box in each page and post editor page.
    – globally turn off the page titles with .entry-title {display: none;}
    – then on those pages where you do want it, use the CSS meta box with .entry-title {display: inline;}

    Cheers!
    Lyle

    http://snifflevalve.com
    Tutorials and tips for GeneratePress, WP Show Posts, WordPress and Elementor

    #225355
    Tom
    Lead Developer
    Lead Developer

    You can disable them globally, but then it’s a little bit harder to enable them only on certain pages.

    Check out the filter here: https://generatepress.com/forums/topic/disable-content-title/

    There’s no real way to make the Disable Elements option checked by default, so I’m not sure how I would work something like this in.

    The best way to do it right now is in the filter I linked to, using a conditional like:

    add_filter( 'generate_show_title', 'tu_alter_title' );
    function tu_alter_title() { 
        if ( is_page( array(5, 7, 8, 20) ) ) {
            return true;
        } else 
            return false;
        }
    }

    Where 5, 7, 8 and 20 are the page IDs where you want the title to show up.

    #225416
    Bruce

    Thanks for the suggestion Lyle. I was trying to avoid the CSS route though.

    Thanks for pointing out the filter Tom. It’s not ideal though, because as you said it’s hard to enable on certain pages.

    I was just trying to look for a more page builder friendly (Beaver Builder in my case) solution out of the gate.

    Thank you both for the input though!

    #225451
    Tom
    Lead Developer
    Lead Developer

    You can ask the BB developers if there’s a way to check if BB is activated on the page using PHP.

    Something like:

    add_filter( 'generate_show_title', 'tu_alter_title' );
    function tu_alter_title() { 
        if ( get_post_meta( 'beaver_builder_active' ) ) {
            return false;
        } else 
            return true;
        }
    }
    #225542
    argosmedia

    You may try one of these plugins:

    https://wordpress.org/plugins/wp-hide-title/
    https://wordpress.org/plugins/hide-singular-title/
    or even https://wordpress.org/plugins/autovisie-ab-titles-testing/

    They’re not recently updated though, so they might not work well with the lastet WP. I didn’t check.

    Jurgen Nijhuis - Argos Media

    #1539446
    Paul

    maybe tom’s function above could be modified to use the ‘disable content title’ checkbox in the OPPOSITE way, that is, if it’s checked, display the title ?

    that way, it could be off by default, or on if checked. πŸ™‚

    #1539481
    Leo
    Staff
    Customer Support

    Unfortunately that will require a custom solution πŸ™‚

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