Conversation
supportI’ve run into a strange problem where wp-Typo still processes the classes in the “Ignore CSS classes” box. My setup is that I have a heading type that I don’t want processed, so I added the noTypo class, and it still processed. I tested adding a new custom class to the Ignore CSS classes window and adding that to the headings, but they still processed. Turning off processing for headings works fine, as does adding the h1 tag to the Ignore HTML elements box. It’s just the CSS classes that don’t want to work. My setup: WP v.6.5.2 Bricks Builder v.1.9.7.1 PHP v.8.3.3 Active plugins: Admin and Site Enhancements (ASE) (6.9.7) by wpase.com Advanced Custom Fields PRO (6.2.9) by WP Engine Classic Editor (1.6.3) by WordPress Contributors HappyFiles Pro (1.8.3) by Codeer Limit Login Attempts Reloaded (2.26.8) by Limit Login Attempts Reloaded wp-Typography (5.9.1) by Peter Putzer Are there any known conflicts or similar? TIA, and thanks for a great plugin!
HI @filwi91 , how did you add that class, as part of the theme’s template? Most likely, wp-Typography never gets to see the actual tag and is only filtering the content of that heading type (via the the_title hook). In that case, excluding CSS classes or IDs will not work (and strictly speaking, excluding elements would not work either, except titles are as special case and always ignored if H1 or H2 tags are set to be excluded). This is part of the FAQ (but the section could probably benefit from some examples).
Ah, let’s see if I understand it (after reading the FAQ): wp-Typo gets the contents of the title field, the way it’s written inside the wp admin side. Therefore, setting a noTypo-class in the editor won’t do anything, since the editor is the last step after all the other plugins (including wp-Typo) have done their changes to the field content. Therefore, if I want to remove wp-Typo from an element using classes, I need to either add the noTypo class by hand inside the field itself (i.e. add a span or div tag to the heading), or figure out a way to get Bricks to add classes before filtering. Is that correct? (BTW, thanks for the quick reply!)
Broadly, yes. It depends on how the theme (or in your case, the page builder) calls the native WordPress functions/hooks. But please be aware that with some themes, HTML in titles results may result in other issues (because they incorrectly assume it cannot contain markup when adding the WordPress title to HTML attributes like title ). If there was a freely available version of Bricks Builder, I’d checkout if there are any hooks that might be able to help, but I don’t think there is one.
HI @filwi91 , how did you add that class, as part of the theme’s template? Most likely, wp-Typography never gets to see the actual tag and is only filtering the content of that heading type (via the the_title hook). In that case, excluding CSS classes or IDs will not work (and strictly speaking, excluding elements would not work either, except titles are as special case and always ignored if H1 or H2 tags are set to be excluded). This is part of the FAQ (but the section could probably benefit from some examples).
Ah, let’s see if I understand it (after reading the FAQ): wp-Typo gets the contents of the title field, the way it’s written inside the wp admin side. Therefore, setting a noTypo-class in the editor won’t do anything, since the editor is the last step after all the other plugins (including wp-Typo) have done their changes to the field content. Therefore, if I want to remove wp-Typo from an element using classes, I need to either add the noTypo class by hand inside the field itself (i.e. add a span or div tag to the heading), or figure out a way to get Bricks to add classes before filtering. Is that correct? (BTW, thanks for the quick reply!)
Broadly, yes. It depends on how the theme (or in your case, the page builder) calls the native WordPress functions/hooks. But please be aware that with some themes, HTML in titles results may result in other issues (because they incorrectly assume it cannot contain markup when adding the WordPress title to HTML attributes like title ). If there was a freely available version of Bricks Builder, I’d checkout if there are any hooks that might be able to help, but I don’t think there is one.