Modify HTML Tags In Genesis Blocks

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.

Download Folder

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.

Related Code Snippets

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.