最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

categories - How to remove category titles?

programmeradmin0浏览0评论

When I go into certain categories, there is a page title that says "Category: category_name", like this:

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.

So, does anyone know how I can remove the category from the title? By the way, the theme I am using is Tesseract.

When I go into certain categories, there is a page title that says "Category: category_name", like this:

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.

So, does anyone know how I can remove the category from the title? By the way, the theme I am using is Tesseract.

Share Improve this question edited Jan 23, 2016 at 17:01 bummi 1091 silver badge5 bronze badges asked Jan 23, 2016 at 16:40 theJulstheJuls 1392 silver badges9 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You can find in inc/template-tags.php file.

if ( is_category() ) {
    $title = sprintf( __( 'Category: %s', 'tesseract' ), single_cat_title( '', false ) );
}
发布评论

评论列表(0)

  1. 暂无评论