Thanks Ankit, I was able to solve it with the help of your chat support. Appreciate it! Leaving the working code here for people that might need it:
function prefix_category_title($title)
{
if (is_tax()) {
$title = single_term_title(”, false);
}
return $title;
}
add_filter(‘get_the_archive_title’, ‘prefix_category_title’);
Thanks for your reply Ankit. I already had the child theme and custom functions.php installed so it was not any trouble.
However, I tried the code above but it’s not working. I’m using the ‘Portfolio’ feature of WordPress as I mentioned and this seems to be the reason why, as I tested it and it worked on ‘Post’ categories.
Here is the same page with the above code applied: https://bit.ly/2M1MZVb
Hi, sure here it is, for e.g. this page: https://bit.ly/2M1MZVb
-
This reply was modified 6 years ago by Charlar.