Tagged: breadcrump
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?
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
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
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//” />
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”){
$shome .= ‘/’;
}
}