Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1224079

    Hi,

    Since I have changed of demo with Enfold, there is no H1 any more on categories and tags.

    The new demo that i use is : “démon Consulting”.

    On this type of demo, I can’t add H1 in categories and tags.

    See these private examples.

    I’ve tried to add H1 with HTML code with editing categories ans tags without success (in metadescription field).

    #1224164

    Hey seb332,

    Please have a look at the following thread:

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1224253

    Thks. It is working for categories.

    I have tried to adapt the code for tags too without success. (by modifying the if condition).

    Perhaps, this line must be modified for tags too, echo ‘<h1>’ . single_cat_title(”,false) . ‘</h1>’;

    #1225831

    Hi,

    You may need to use this function for the tag pages.

    // https://developer.wordpress.org/reference/functions/single_tag_title/

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

    Best regards,
    Ismael

    #1225893

    Hi,

    Unfortunately, I’ve tried this fix. It is only working on categories.

    I don’t know why, It doesn’t work on tags. :(

    See private example.

    #1226087

    Hi seb332,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1226090

    Sure. I have modified using the child theme.

    • This reply was modified 4 years, 10 months ago by seb332.
    #1226474

    Hi seb332,

    I don’t see the code added to the tap.php file. How are you making changes there?

    Best regards,
    Victoria

    #1226475

    Ok. I though it was in archive.php.

    I’il do modification in that file.

    #1226478

    Ok. This issue is fixed.

    Thlks a lot.

    Have a good day.

    #1226791

    Hi seb332,

    Glad you got it working for you! :)

    Archive.php is for categories and tag.php is used to render the tags page.

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.