Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #263898

    Hello.
    I need the breadcrump take the home path of as http://www.tavad.com/en/ as http://www.tavad.com/blog/

    Currently does not include / closing, causing a 301 redirect.

    I can indicate that I should change. We need to change the file
    wp-content \ themes \ enfold \ includes \ template-helper-logic.php?

    #265170

    Hi Juan-Jose!

    We use the get_bloginfo() function to generate the home url. If you want to change it open up wp-content/themes/enfold/framework/php/class-breadcrumb.php and search for:

    
    $trail[] = '<a href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" rel="home" class="trail-begin">' . $show_home . '</a>';
    

    Best regards,
    Peter

    #265741
    This reply has been marked as private.
    #266367

    Hi!

    This will work too, add it to your child theme functions.php:

    add_filter( 'home_url', 'fix_home_url_trailing_slash', 100, 4 );
    function fix_home_url_trailing_slash($url) {
      return $url."/";
    }

    Best regards,
    Josue

    #267940

    Hi

    When I include this function is performed at all sites without distinguishing whether the latter already includes / producing effects in the header code like this:
    <link rel=”canonical” href=”http://www.tavad.com//&#8221; />

    Changing the previous file this effect does not occur.
    The code used is:

    /* If $show_home is set and we’re not on the front page of the site, link to the home page. */
    if ( !is_front_page() && $show_home )
    $shome = home_url();
    $rest = substr($shome, -1); // devuelve el ultimo caracter de la cadena
    if ($rest != “/”)
    {
    if ($shome != “http://www.tavad.com&#8221;){
    $shome .= ‘/’;
    }
    }

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Breadcrump without / in the link path to the home’ is closed to new replies.