Viewing 5 replies - 1 through 5 (of 5 total)
  • Use this:

    add_filter( 'tc_search_results_title' , 'my_search_results_title');
    function my_search_results_title(){
      $my_search_results_title = __('Search results :', 'customizr-child');
      return $my_search_results_title;
    }

    changing Search results : with whatever you want.

    Hope this helps.

    Thread Starter ruipdguerra

    (@ruipdguerra)

    Ok. It helped. But in my breadcrumbs, how to change?

    add_filter('tc_breadcrumb_trail_items', 'search_results_breadcrumb');
    function search_results_breadcrumb( $trail ){
      if ( ! is_search() )
        return $trail;
    
      $_last = sizeof($trail) - 1;
      $_search_string = __('Search resultssss: ', 'customizr-child');
      /* or you an use the function used for that other snippet to have the same title, in this case remove the comment of the line below */
    //  $_search_string = my_search_results_title();
    
      if ( is_paged() )
        $trail[$_last] = '<a href="' . get_search_link() . '" title="' . sprintf( esc_attr__( 'Search results for &quot;%1$s&quot;' , 'customizr' ), esc_attr( get_search_query() ) ) . '">' . sprintf( '%2$s &quot;%1$s&quot;' , esc_attr( get_search_query() ), $_search_string ) . '</a>';
    else
      $trail[$_last] = sprintf( '%2$s &quot;%1$s&quot;', esc_attr( get_search_query() ), $_search_string );
    
      return $trail;
    }
    Thread Starter ruipdguerra

    (@ruipdguerra)

    great! awesome! thanks ??

    You’re welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change text "search results for"’ is closed to new replies.