This code enables you to change the HTML tags ( opening & closing ) in the Genesis accordion block or any other Genesis or WordPress block.
In this case, we’ll change the HTML tags for the gb-accordion-text
on the front end so the changes can be seen when inspecting the source code using inspect element like this :
In this example, we change both the opening & closing p
tags to h3
tags.
Demo Video
Shows the accordion text list items wrapped in h3 tags
Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme or any WordPress theme using Genesis Blocks.
Installation
There’s only 1 step :
Copy & paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions.php file or custom functions plugin.
Leave a Reply