Pour Gutenberg, utilisez ce CSS en backoffice
/* Retire le choix H1 du bloc Title de Gutenberg */
.block-library-heading-level-toolbar button.components-button:first-of-type {
display: none;
}
Pour TinyMCE, copiez le code ci-dessous dans le fichier functions.php pour ne garder qu’un accès à ces styles :
- Paragraphe
- H2
- H3
- H4
[pastacode lang= »php » manual= »function%20seokey_admin_tinymce_style_dropdown(%20%24initArray%20)%20%7B%0A%0A%09%2F%2F%20Default%20configuration%20of%20TinyMCE%20(located%20in%20tinymce.min.js)%0A%09%2F%2F%20Paragraph%3Dp%3BHeading%201%3Dh1%3BHeading%202%3Dh2%3BHeading%203%3Dh3%3BHeading%204%3Dh4%3BHeading5%3Dh5%3BHeading%206%3Dh6%3BPreformatted%3Dpre%22%0A%0A%09%2F%2F%20Change%20Style%20Dropdown%20to%20remove%20h1%2C%20h6%20and%20preformated%20styles%0A%09%24initArray%5B’block_formats’%5D%20%3D%20’Paragraph%3Dp%3BHeading%202%3Dh2%3BHeading%203%3Dh3%3BHeading4%3Dh4%3BHeading%205%3Dh5’%3B%0A%0A%09%2F%2F%20return%20final%20value%0A%09return%20%24initArray%3B%0A%7D%0Aadd_filter(%20’tiny_mce_before_init’%2C%20’seokey_admin_tinymce_style_dropdown’%2C%2010%20)%3B » message= » » highlight= » » provider= »manual »/]
Laisser un commentaire