Archived topic
Hide "Category:" on page
3 replies · Started by Market Design Team on April 5, 2020
I want to use the default Category title for page titles, but I don't want the Category: part of the title.
I've installed a Child theme so I can edit the PHP if need be.
Thanks in advance!
Hi there,
This is the filter you'd need:
https://developer.wordpress.org/reference/functions/get_the_archive_title/
For example:
https://generatepress.com/forums/topic/add-conditional-label-to-category-and-tag-archive-page-titles/#post-488140
You can also see lots of examples by searching get_the_archive_title in our forum.
I noticed that the title is coming from Elementor so I'm not sure if they handle this differently.
Unfortunately, this wasn't enough to help me hide it.
I tried looking at other examples, loading different code, etc.
I even reached out to Elementor, and they said it's "custom code" and didn't have any help.
Looking at the elementary code, it's just calling the archive_title, but I can't seem to affect any change at all on the title.
Please help! Last step to clean up the page.
Actually the word Category should not show by default in GP - you can test the Uncategorized link at the bottom of this post:
https://gpsites.co/marketer/2018/09/08/the-fastest-wordpress-theme/
Can you confirm that by going to a default category page without using Elementor?