Hello,
Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.
If you wish to make <H5> tag as default, you can do that too. But for that, you’ll need to edit the core file of our plugin. ( Even though we don’t recommend changing core files. )
To do that, please head over to /wp-content/plugins/seo-by-rank-math/includes/modules/schema/blocks/class-block-faq.php and on line 186,
replace the following part:
<%1$s class="rank-math-question %2$s">%3$s</%1$s>'
with this one:
'<h5 class="rank-math-question %2$s">%3$s</h5>
Note: this will convert every FAQ question’s tag present on your site, from other tags (H2,H3 or any other tags) to <H5> tag.
Please be advised that, Changes will be reset/removed once you update Rank Math plugin.
#2 Another way can be to change the HTML markup on the fly with JavaScript.
For reference, you can follow the URL I’ve shared below:
https://api.jquery.com/html/
Note: If we decide to make changes on this particular line in our plugin in the future, there’s a possibility that the method won’t work anymore as well.
Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.
Thank you.
Thanks for the response, is there a workaround to the first solution where I can perhaps include a PHP snippet in my own functions.php file instead to keep the change regardless of when the plugin updates?
Hello,
Please try applying the following filter to see if that works for you:
function rm_change_faq_titleWrapper(){
return 'h5';
}
add_filter('rank_math/blocks/faq/title_wrapper','rm_change_faq_titleWrapper');
Here’s how you can add filters/hooks to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Note: You should notice the changes on the front-end.
Let us know how it goes. Looking forward to helping you.
Thank you.
Works like a charm. Thanks guys
Hello,
We’re glad that this resolved your issue.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.