Home Forums Pro Themes Travel Ultimate Pro Travel Ultimate Pro: removing category label on header

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #105334
    Alize Barth
    Participant

    Hello,
    How do I remove the word “Category” in front of the name of it? I don’t want to have it on the header and I don’t find any plugin to solve this.
    Any help is welcome, have a great day.
    Alizé

    #105368
    wensolutions
    Keymaster

    Hello,

    To remove the category title, please add below given code in your child theme functions.php file.

    To know how you can create and activate the child theme, please refer to below-given link:

    https://wptravel.io/how-to-create-a-child-theme/

    After activating the child theme in your child theme functions.php file add below given code:

    function travel_ultimate_child_remove_cat_titles($title) {
      if ( is_archive() ) {
    
        $title = single_cat_title( '', false );
    
      } elseif ( is_tag() ) {
    
        $title = single_tag_title( '', false );
    
      } elseif ( is_author() ) {
    
        $title = '<span class="vcard">' . get_the_author() . '</span>' ;
      }
      return $title;
    }
    add_filter( 'get_the_archive_title', 'travel_ultimate_child_remove_cat_titles' );

    Hope this helps.

    Thank you.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.