- This topic has 7 replies, 2 voices, and was last updated 3 years, 5 months ago by Leo.
-
AuthorPosts
-
September 9, 2016 at 12:05 pm #225294Bruce
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. π
September 9, 2016 at 7:40 pm #225335LyleHi 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!
LyleSeptember 9, 2016 at 11:23 pm #225355TomLead DeveloperLead DeveloperYou 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.
September 10, 2016 at 7:09 am #225416BruceThanks 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!
September 10, 2016 at 9:39 am #225451TomLead DeveloperLead DeveloperYou 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; } }
September 11, 2016 at 2:59 am #225542argosmediaYou 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.
November 20, 2020 at 1:18 pm #1539446Paulmaybe 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. π
November 20, 2020 at 2:32 pm #1539481LeoStaffCustomer SupportUnfortunately that will require a custom solution π
-
AuthorPosts
- You must be logged in to reply to this topic.