
-
AuthorPosts
-
October 18, 2019 at 10:43 am #1149210
I would like to know how to add title with name of category on the page category archive.
Just need to add the category name at the top of the page – i’m using Grid Layout in Blog Layout — Enfold Blog Layout conf, and the title doesn’t appear.
I activated the bar with the title and breadcrumbs, but that’s not what I want. I want the title (with category name) at the top of the page.
tks,
Junior BrambillaOctober 20, 2019 at 12:17 pm #1149609Hey Junior,
Could you please attach a mockup of what you’re trying to achieve?
Best regards,
VictoriaOctober 21, 2019 at 4:25 pm #1149901Hey Victoria,
See link: https://www.dropbox.com/s/pftqgt6owww5gtq/category.jpg?dl=0
I want add title (h1 – exemple) with category name … now show only description of category, no title … ok
Tks,
JuniorOctober 24, 2019 at 3:36 pm #1150926Hi,
Thanks for the update.
You can modify the archive.php file. If you have a child theme, just create a copy of the file in the child theme directory. Look for the term or category description around line 34:
<?php $tds = term_description(); if($tds) { echo " <div class='category-term-description'>{$tds}</div> "; } ?>
Below, you can add this code to render the category title:
<?php single_cat_title('Currently browsing '); ?>.
More info in the documentation.
// https://developer.wordpress.org/reference/functions/single_cat_title/
Best regards,
IsmaelOctober 24, 2019 at 3:46 pm #1150931Hi, Ismael
The file already has the code you sent. And it’s not working … it doesn’t show the title at the top of the page.
Tks,
JuniorOctober 25, 2019 at 11:42 am #1151167Hi,
Thank you for the update.
We may need to access the site in order to see what’s going on. Please post the WP login details in the private field, and make sure that the Appearance > Editor panel is accessible so that we can edit the files if necessary.
Best regards,
IsmaelOctober 25, 2019 at 11:46 am #1151169Ok!!!
October 28, 2019 at 1:55 pm #1151752 -
AuthorPosts
- You must be logged in to reply to this topic.