Customized Template

Closed
Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme January 26, 2019
Login to reply
Kelly R Support Agent
4 years ago
Resolved.
Kelly R Support Agent
5 years ago

Please put following code.

if ( is_search() ) {

                 if ( is_search() ) {
    echo '<li class="active">'; 
    switch ( get_post_type( $post ) ) { 
       case 'accommodation': 
            echo 'Your text1' . ' '; 
            break; 
    case 'tour': 
            echo 'Your text2' . ' '; 
            break; 
      case 'cruise': 
            echo 'Your text3' . ' '; 
            break; 
        default: 
            echo esc_html( get_post_type( $post ) ) . ' ';  
    } 
    echo esc_html__('SEARCH RESULTS', 'trav'); 
    echo "</li>"; 
}

Regards, C-Themes

Annalaura Taveri
5 years ago

HI,

  1.    I put your code in the file you had say, but the site doesn't display (see screenshot 2). 
  2.    As u can see in screenshot 1, inserting your code there is an error, why? 

Can we try to resolve this in few time please?

Thanks

Kelly R Support Agent
5 years ago

Please find in trav_breadcrumbs function in /inc/functions/functions.php


Annalaura Taveri
5 years ago

ok,


and can u tell me where is it?

Thanks

Kelly R Support Agent
5 years ago

Hi,

You can find following code.

 if ( is_search() ) {

                echo '<li class="active">';
                echo esc_html( get_post_type( $post ) ) . ' ';
                echo esc_html__('SEARCH RESULTS', 'trav');
                echo "</li>";
            }

Replace it like following

 if ( is_search() ) {

    echo '<li class="active">';
    switch ( get_post_type( $post ) ) {
       'accommodation':
            echo 'Your text1' . ' ';
            break;
        'tour':
            echo 'Your text2' . ' ';
            break;
        'cruise':
            echo 'Your text3' . ' ';
            break;
        default:
            echo esc_html( get_post_type( $post ) ) . ' ';
    }
    echo esc_html__('SEARCH RESULTS', 'trav');
    echo "</li>";
}

Regards, C-Themes


Annalaura Taveri
5 years ago

Hi,

ok, see the attachments please,

thanks

Kelly R Support Agent
5 years ago

Hi,

Please tell me how you want to change the text.

Then I will guide you or help you do.

Regards, C-Themes

Annalaura Taveri
5 years ago
Hi,as you suggested, I went to look at the following code: trav_breadcrumbs function in /inc/functions/functions.php file but I could not understand the operation, I found the word Home but I have to change the writing in yellow (see screenshot attached), where is it?Please let me know,thanks
Annalaura Taveri
5 years ago

Ciao,

as you suggested, I went to look at the following code:

trav_breadcrumbs function in /inc/functions/functions.php file

but I could not understand the operation, I found the word Home but I have to change the writing in yellow (see screenshot attached), where is it?

Please let me know

Regards

Kelly R Support Agent
5 years ago

Hi,

Please find trav_breadcrumbs function in /inc/functions/functions.php file.

Regards, C-Themes


Annalaura Taveri
5 years ago

Hi,

as the request of the customer I customize the theme, I can not find this field on php file (see attached screenshot), please can you tell me where it is?

Thank you