Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #413960

    After using Enfold for over a year, I’m just now realizing that the category pages do not have H1 tags associated with them. I tried to find a theme setting to add them, but was unable. Specifically, I want to add the category name as an H1 to my category pages in order to improve SEO. How can I do this?

    Thanks!!

    #414315

    Hi kls1138!`

    Thank you for using our theme.

    You have to modify enfold\archive.php. Look at line 28-30:

    
                       <div class="category-term-description">
                            <?php echo term_description(); ?>
                        </div>
    

    When using a child theme copy archive.php from parent theme fiolder into enfold-child folder and modify this file. This will prevent overriding your changes with the next update.

    Replace this with:

    
    <?php  if( is_category() )
    {
    		echo '<h1>' . single_cat_title('',false) . '</h1>';
    }
    else
    {   ?>
                        <div class="category-term-description">
                            <?php echo term_description(); ?>
                        </div>
    <?php
    }	?>
    

    Best regards,
    Günter

    #417389

    This worked. Thanks, Gunter!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Add H1 Tag to Category Pages’ is closed to new replies.