
Tagged: H1
-
AuthorPosts
-
June 19, 2020 at 3:35 pm #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).
June 19, 2020 at 9:13 pm #1224164Hey seb332,
Please have a look at the following thread:
If you need further assistance please let us know.
Best regards,
VictoriaJune 20, 2020 at 11:23 am #1224253Thks. 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>’;
June 26, 2020 at 2:32 pm #1225831Hi,
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,
IsmaelJune 26, 2020 at 3:51 pm #1225893Hi,
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.
June 27, 2020 at 5:18 pm #1226087Hi 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,
VictoriaJune 27, 2020 at 5:25 pm #1226090Sure. I have modified using the child theme.
-
This reply was modified 4 years, 10 months ago by
seb332.
June 29, 2020 at 3:15 pm #1226474Hi seb332,
I don’t see the code added to the tap.php file. How are you making changes there?
Best regards,
VictoriaJune 29, 2020 at 3:17 pm #1226475Ok. I though it was in archive.php.
I’il do modification in that file.
June 29, 2020 at 3:37 pm #1226478Ok. This issue is fixed.
Thlks a lot.
Have a good day.
June 30, 2020 at 4:27 pm #1226791Hi 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 -
This reply was modified 4 years, 10 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.