add a span in each title - Wordpress Solution
[Solved] - add a span in each title - Wordpress Solution |
---|
Try following codes |
in the content of my posts i have some title like that
in this case i want to remove the "style" to have same thing with h1, h2, h3, h4, h5, h6 AND i want to add a span in every h-tag (h1->h6) like that i have write this function but that doesn't work where is the mistake ? ------------------------------------------------------------------------ edit 1 : TWO THINGS : 1-remove the style in H-tag if there is a style 2-add a span in each H-tag (h1->h6) and just modify my function ------------------------------------------------------------------------ Solution - 1try this
Solution - 2I would do it with Jquery:
Solution - 3you could try this approach: ps: I updated the function (I switched $to and $from) ;-) Solution - 4how about:
Solution - 5If you are okay with jQuery than use below code.. Below code will remove inline styling and add span tags. Place this script after all javascripts so it will load last and if any javascript adding inline style than it will override and remove that too. This is tested and working completely fine. If you want to use jQuery no conflict than change $ to jQuery |
Date: 2022-10-21 05:06:08 |
Category: Wordpress |