Remove “Category:” text in archive page title

Marko Krstić
25 Jan 2020
<h1>
  <?php echo single_cat_title( '', false );?>
</h1>

The result will be just Category name

Default is: Category: Category name

If you want to change “Category:” use this:

<h1>
  <?php echo single_cat_title( 'Some text: ', false );?>
</h1>

Thanks, Hammad Wali for sharing this useful code!

Was this article helpful?

Tags

Categories

Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy