Home Forums Pro Themes Tourable Pro How to remove "Destination:" from page title on trips page?

This topic contains 3 replies, has 2 voices, and was last updated by  wensolutions 1 week, 5 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #97523

    Richard Beckett
    Participant

    Hi, how can I remove ‘Destination:’ from the page title on the trips page for Destinations? Also on the Trip Styles page, remove ‘Trip Styles:’ from the page header. Thanks

    #97604

    wensolutions
    Keymaster

    Hello @richbeckett,

    To remove the category names you have to add the custom code in your child theme functions.php file.

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

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

    Now after the activation of the child theme, add below given code in your child theme functions.php file.

    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.

    Thank you.

    #97612

    Richard Beckett
    Participant

    That worked perfectly, thanks 🙂

    #97617

    wensolutions
    Keymaster

    Hello @richbeckett,

    Glad we could help you.

    Let us know if you have any issue further.

    Also, we would really appreciate if you could help us by rating our plugin by following the link below:

    https://wordpress.org/support/plugin/wp-travel/reviews/

    Thank you.

    Have a great day.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.