- This topic has 3 replies, 3 voices, and was last updated 4 years, 6 months ago by
Support Team.
Viewing 4 posts - 1 through 4 (of 4 total)
- AuthorPosts
- November 20, 2018 at 5:32 pm #8518
Flukkini
ParticipantHello there, is there a way to hide the word “Category” and the “colon” right after it, leaving the category “name” only, on titles of categories pages?
ex.:
Not “Category: Travel”
but “Travel”.Thank you.
November 21, 2018 at 6:47 am #8525WP Travel Admin
KeymasterHello @flukkini,
To hide the category and display the category title, you have to go through the child theme.
To know how to activate and create the child theme please follow the link given below:
http://wptravel.io/how-to-create-a-child-theme/
After activating the child theme in your child theme functions.php add below given code.
function wp_travel_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', 'wp_travel_child_remove_cat_titles' );
Hope this helps.
Let us know if you have any confusion regards.
Thank you.
Regards!!
November 21, 2018 at 7:47 am #8531Flukkini
Participantthank you.
November 21, 2018 at 8:07 am #8533Support Team
KeymasterHello @flukkini,
Glad to help you.
If you have any issues further then kindly let us know.
Thank you.
Regards!!
- AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Travel Log’ is closed to new topics and replies.