How to remove category titles?
-
When I go into certain categories, there is a page title that says “Category: category_name”, like this:
https://i.stack.imgur.com/nwUaS.png
I would like to remove the “Category” from that title.
I’ve already looked around quite a bit and found nothing that works for me. Most answers say to edit the category.php file which doesn’t exist in the theme I am using or go to archive.php which doesn’t seem to have anything relevant to the category title.On archive.php, the only seemingly relevant code that even mentions category is this:
<?php if ( is_tag() || is_category() || is_tax() ) { ?> <div class="archive-description"><?php the_archive_description(); ?></div> <?php } ?>
I don’t think it’s relevant at all to what I am trying to do.
I have also been told as a response to this question, that I could inc/template-tags.php and change this code:
if ( is_category() ) { $title = sprintf( __( 'Category: %s', 'tesseract' ), single_cat_title( '', false ) ); }
Unfortunately, whenever I do this (by either removing ‘Category’ or subbing it for some other word), nothing happens. So either I am missing something, or I need to change it somewhere else.
So, does anyone know how I can remove the category from the title? By the way, the theme I am using is Tesseract.
- The topic ‘How to remove category titles?’ is closed to new replies.