NO BUG: Title in pages after 1.8 update

Browser: Chrome
OS: Windows

I know this is not really a bug, but at the same time I think it’s something that needs to be solved. After the last update, the H1 heading title on the pages was added. I have some pages built with Bricks, and some that are not. I DO NOT want this title, but I don’t know how to get rid of it. If I create a template for the pages on the website, and put only the “Post content” element in it, it asks me the source (WordPress or Bricks). In one case it breaks the Bricks pages, in the other it breaks the Non-Bricks pages. I looked through the settings but found nothing. Not sure what to do.

Hey Giovanni,

thanks for your report.

Usually you want a title (h1) on your pages. That’s why we added it to the default template.

Can you please add two Post Content elements to your page template and choose WordPress as the data source for the one and Bricks as the data source for the other? That should give you what you want.

CleanShot 2023-06-07 at 08.34.44@2x

Let me know if that helps.

Best,

André

Hi @aslotta ,
thanks for the response. I completely understand that some people may want the title on pages, but some may not, so my suggestion is to add a toogle on the theme settings, as happens in many other themes, to show it or not show it.

BTW I tried your suggestion, but it’s not working for me, because some Bricks pages get completely “smashed up”. I also tried to use some CSS to remove it, but there is no class I can use to hide it :frowning:

Thanks for the help

1 Like

Hey Giovanni,

would you mind sharing your page with me and ideally providing me with some temporary access to see why my proposed solution does not work for you?

Best,

André

Hi @aslotta , I’m quite sure I understood the root of the problem. The page is “converting” Bricks data as Gutenberg data (due to the setting), and so now that I have the two shortcodes, it’s rendering both things one under the other.

The solution would be to uncheck that option and manually remove every Gutenberg data in every page of the website, but this is way too long to achieve (since the website has 141 pages).

If you want I can still give you temporary access, but the problem was this, not sure if there is some way to overcome it

Best regards

Hey Giovanni,

I totally forgot about a hook that we added in addition to this page template change (thanks @itchycode for reminding me :slight_smile:). You can use the bricks/default_page_title hook to disable it for specific pages or even completely.

Hope this helps.

Best,

André

Thanks @aslotta , I’ll check this out and try to implement it in a way that disable completely the page title!

Hey Giovanni,

just use it like this to disable the title completely:

add_filter( 'bricks/default_page_title', '__return_empty_string' );

You can add this line to your child theme’s functions.php (if applicable) or use a code snippet plugin.

Best,

André

Thanks @aslotta , that’s better than the one I used!

Just found this as I have the same problem.

Perhaps this could be moved to the Feature Request section?

While the above filter does work it is rather clumsy if you want some pages to have titles and others not to. If you ever change anything or add new pages you have to remember to also update the filters. ( Worse if others are updating things and aren’t even aware of the filters )

Much better would be to have a check box for each page to enable/disable the title. Simple and things in one place.
Most ( every? ) other theme I’ve used has always had this option.

1 Like

I have noticed that when I create a new page in the admin and then click on “Edit with Bricks”, the H1 is gone. When I start to edit the page in another way, the H1 is still there.