Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1404770

    My category pages do not have any H1 on them and it’s causing warnings within SEMRush.

    I have seen the threads here
    https://kriesi.at/support/topic/add-h1-tag-to-category-pages/#post-413960
    but it appears the line numbers are different in the current archive.php
    -is there an update on the lines of code which need to be updated?
    -is the revised code listed in the link above still valid?

    Thank you in advance!

    #1404784

    Hey tsays,

    Thank you for the inquiry.

    You have to edit the same file (archive.php) and look for the same lines of code starting from line 38.

    $tds = term_description();
    					if( $tds )
    					{
    						echo "<div class='category-term-description'>{$tds}</div>";
    					}
    

    Replace it with:

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

    Best regards,
    Ismael

    #1404827

    Thank you for your help. I appreciate it.

    #1404870

    Hi,
    Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

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