• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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 :

P Tags
P Tags
H3 Tags
H3 Tags

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

  • Change Post & Page Grid Class in Genesis Blocks

Accordion & Toggle Genesis Blocks Genesis Markup Gutenberg

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.