Home Support HashOne Title of the category

This topic contains 1 reply, has 1 voice, and was last updated by  shap 2 weeks, 2 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4645


    Sorry for my English 😉
    I have a problem.
    How do I delete the “Category:” text displayed in the title in the page header (in the category posts)? Now “Category: News” is displayed, I would like to display the same “News”.



    How to remove “Category:” from category title
    It’s easy to do that. Simply open the functions.php file in your theme and add the following code at the end of the file:

    function prefix_category_title( $title ) {
    if ( is_category() ) {
    $title = single_cat_title( ”, false );
    return $title;
    add_filter( ‘get_the_archive_title’, ‘prefix_category_title’ );

    Now refresh your category pages and you will see “Category: ” is gone.

    • This reply was modified 2 weeks, 2 days ago by  shap.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.