Skip to content
Help Center
  • Pricing
  • ProductsExpand
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • SupportExpand
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Account
Get Kadence
Kadence Theme
  • Features
  • Pro
  • Starter Templates
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Roadmap
    • Changelog
Help Center
Kadence Theme

Kadence Theme

  • Create a Full Screen Landing Page

Getting Started

  • Theme Installation
  • Getting Started with a Classic Starter Template

Customize Settings

  • How to customize the Kadence Footer
  • Responsive Breakpoints in Kadence
  • How to Import, Export, and Reset Kadence Theme Customizer Settings Using Starter Templates Plugin
  • How to use the Kadence Theme Color Palette
  • Typography and setting font sizes for different devices
  • How to setup Page/Post settings
  • How to Add a Sidebar
  • Sticky Sidebars
  • How to style Buttons
  • How to add Scroll To Top

Header

  • How to Customize the Kadence Header
  • Customizing the Mobile Navigation Area
  • How to Use a Transparent Header
  • Customizing the Topbar
  • Navigation Colors (Transparent Header, Sticky Header)
  • Edit Dropdown Menu Styling
  • Working with the Sticky Header
  • Social Media Icons in the Header
  • Editing a Row in the Header

General WordPress

  • Set Site Favicon
  • How do I add Custom CSS
  • Adding Google Analytics
  • How to backup my site?
  • How to add a Custom Post Type
  • Fix: Page Not Updating
  • How to Find the Page or Post ID
  • How to prevent spam comments
  • How do I turn off comments?
  • How to Remove All Spam Comments

Troubleshooting

  • Troubleshooting the “Update Failed: Service Unavailable” error when updating Pro Kadence WP plugins
  • How to Enable the WordPress Error Logs
  • WordPress Error “Incompatible Archive”
  • Temporarily deactivating plugins
  • How to View Console Log Errors
  • Clearing Your Website Cache
  • How to preview the mobile version of your site on Desktop
  • Getting 500 error
  • Broken Styles after version 1.1.15

Advanced

  • Common Code Snippets for Kadence Users
  • How to translate using LocoTranslate
  • How to hook elements inside of post or page content
  • What Is a Child Theme, Should I install one, if so How?
  • How to add a custom filter or function with Code Snippets
  • Adding Custom Fonts to Kadence
  • How to make a custom 404 page
  • How to change a theme icon to something custom
  • Change any text on your site
  • Changing Various Heading HTML Tags
  • Adding Google Tag Manager with a child theme or code snippet plugin
  • Replace Author HTML (Multiple Author Support)
  • Theme hooks

Pro Addon

  • Kadence Maintenance Mode
  • WooCommerce Addons
  • How to Display Custom Post Types with Kadence Elements Templates and the Post/Grid Carousel
  • How to use conditional header
  • Theme hooks
  • Kadence Theme Pro Plugin
  • Header Addons
  • How to create a Mega (multicolumn menu)
  • How to add contact information
  • How to add a toggle open menu for desktop
  • How to use the Color Palette Switch (Dark Mode)
  • How to add a login and account Menu
  • Kadence Custom Fonts
  • How to add scripts in header/footer
  • How to open the side cart when a product is added to cart
  • How to use Element Hooks

Kadence Elements

  • What is Kadence Elements?
  • Installing Kadence Elements
  • The Four Types of Kadence Elements
  • Switching between different Kadence Elements Types
  • Showing/Hiding Kadence Elements Settings
  • How to Create a Kadence Elements Content Section
  • Creating a Template Element
  • What goes into an element?
  • How to Replace the Footer Using a Kadence Element
  • How to Use an Element to Replace the Archive Loop Item Content
  • How to Design a Post Grid/Carousel using a Kadence Element

Woocommerce

  • How to Add Image Switch on Hover for Product Archives
  • How to Add a Mini Cart to the Site Header
  • How to Change the WooCommerce Product Loop Title Tags
  • Home
  • Knowledge Base
  • Kadence Theme
  • Kadence Theme
  • Advanced

Changing Various Heading HTML Tags

Changing the markup isn’t always a good idea, you can hurt your accessibility score by changing the sequentially-descending order. However, some people want to do this or they want to change the text output. In this tutorial, we will look at changing the headings HTML tag and where applicable the headings text in 4 common areas of interest. Related Posts, Comments, Comments Leave a reply, and Widget titles. This is all done using PHP filters and these are best added by using a code snippet plugin.

How to Change the Similar Posts Title

If you just want to change the heading for “Similar Posts” to use a different html tag, for example an h4 tag, you can use this filter.

/**
 * Change the similar posts title output.
 *
 * @param string $html the output html.
 */
function custom_similar_posts_title( $html ) {
    $html = '<h4 class="entry-related-title">' . esc_html__( 'Similar Posts', 'custom-text-domain' ) . '</h4>';
    return $html;
}
add_filter( 'kadence_single_post_similar_posts_title', 'custom_similar_posts_title' );

If instead you want to change the text output to read Similar Posts to {post-title} where post title is the current posts title you can use a filter like this.

/**
 * Change the similar posts title output.
 *
 * @param string $html the output html.
 */
function custom_similar_posts_title( $html ) {
    $html = '<h2 class="entry-related-title">' . esc_html__( 'Similar Posts to', 'custom-text-domain' ) . ' ' . get_the_title() . '</h2>';
    return $html;
}
add_filter( 'kadence_single_post_similar_posts_title', 'custom_similar_posts_title' );

How to Change the Comments Title

If you just want to change the heading for “One Comment” to use a different html tag, for example an h4 tag, you can use this filter.

/**
 * Change the post comments title output.
 *
 * @param string $html the output html.
 */
function custom_post_comments_title( $html ) {
    $html = '<h4 class="comments-title">';
    $comment_count = (int) get_comments_number();
    if ( 1 === $comment_count ) {
        $html .= esc_html__( 'One Comment', 'kadence' );
    } else {
        $html .= sprintf(
            /* translators: 1: comment count number */
            esc_html( _nx( '%1$s Comment', '%1$s Comments', $comment_count, 'comments title', 'kadence' ) ),
            number_format_i18n( $comment_count )
        );
    }
    $html .= '</h4><!-- .comments-title -->';
    return $html;
}
add_filter( 'kadence_single_post_comments_title', 'custom_post_comments_title' );

If instead you want to change the text output to read One Comment to {post-title} where post title is the current posts title you can use a filter like this.

/**
 * Change the post comments title output.
 *
 * @param string $html the output html.
 */
function custom_post_comments_title( $html ) {
    $html = '<h2 class="comments-title">';
    $comment_count = (int) get_comments_number();
    if ( 1 === $comment_count ) {
        $html .= esc_html__( 'One Comment', 'kadence' );
    } else {
        $html .= sprintf(
            /* translators: 1: comment count number */
            esc_html( _nx( '%1$s Comment', '%1$s Comments', $comment_count, 'comments title', 'kadence' ) ),
            number_format_i18n( $comment_count )
        );
    }
    $html .= ' ' . esc_html__( 'on', 'kadence' ) . ' ' . get_the_title();
    $html .= '</h2><!-- .comments-title -->';
    return $html;
}
add_filter( 'kadence_single_post_comments_title', 'custom_post_comments_title' );

How to Change the Leave a Reply Heading Tag

To change the comments “Leave a Reply” heading tag to use an h4 html tag you can use this filter.

/**
 * Change the comment form title HTML tag.
 *
 * @param array $args the comment form args.
 */
function custom_commentform_title_tag( $args ) {
    $args['title_reply_before'] = '<h4 id="reply-title" class="comment-reply-title">';
    $args['title_reply_after']  = '</h4>';
    return $args;
}
add_filter( 'comment_form_defaults', 'custom_commentform_title_tag' );

How to Change the Widget Title Heading Tag

To change the widget title heading html tag to h4 for example you can use this filter:

/**
 * Change the widget area title HTML tags.
 *
 * @param array $args the widget area args.
 */
function custom_widget_title_args( $args ) {
  $args['before_title'] = '<h4 class="widget-title">';
  $args['after_title'] = '</h4>';
  return $args;
}
add_filter( 'kadence_widget_area_args', 'custom_widget_title_args' );
Change any text on your siteAdding Google Tag Manager with a child theme or code snippet plugin
  • Pricing
  • Products
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • Support
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Login
  • Features
  • Pro
  • Starter Templates
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Roadmap
    • Changelog