[Resolved] Disable H1, H4, H5 in custom field WYSIWYG
This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I found on the net the following function that allows you to remove (choose the ones you keep) the choice of H1, H5, etc. in the list of the native MCE WYSIWYG of WordPress :
function remove_h1_from_heading($args) {
// Just omit h1 from the list
$args['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;';
return $args;
}
add_filter('tiny_mce_before_init', 'remove_h1_from_heading' );
So, in the native WYSIWYG editor of WordPress, I only have the possibility of paragraph, h2 and h3. That's perfect!
I realize however that this function does not apply to Toolset WYSIWYG customs (I still have "H1, H5, H6, pre, etc.").
Is there something special to change in the function so that it applies to all the WYSIWYG fields of the site?
Hello. Thank you for contacting the Toolset support.
I checked and it seems its known issue to us and we already fixed with our develop branch. It needs to undergo the testing.
Can you please wait for next 2-3 weeks and by that time we are planning to release a hotfix release. I hope this makes sense. I already tested the code you shared with the hotfix branch and I can see its working.
I'm adding your ticket to our internal ticket system so when we publish the hotfix version I will get in touch with you and inform you here.
If you will require "beta" version with which I've tested please let me know but we do not offer running your sites with beta version and if you decide to use it, you will have to use it at your own risk.
A quick update to let you know that we have published Types 3.4.17 which includes a fix for this issue.
If the updates do not show up on your plugin installer page (click the registered link beneath the plugin name to go to the custom installer page) click the the Check for Updates button to update the list.