- This topic has 1 reply, 2 voices, and was last updated 5 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Pro Themes › Travel Ultimate Pro › Travel Ultimate Pro: removing category label on header
Tagged: category, category label, category name display
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é
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.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |