Custom name in breadcrumbs first element
January 2013 WordPress Theme
- GK User
- Thu Oct 17, 2013 12:59 pm
Hi,
It must be very easy to do but I can't find the way.....As you can see here http://wp.xeraco.es/urbanisme/ the first element is "Ajuntament de Xeraco" which is the name of the site, but I want to change it for "Inici" (home translated to catalan).
It must be very easy to do but I can't find the way.....As you can see here http://wp.xeraco.es/urbanisme/ the first element is "Ajuntament de Xeraco" which is the name of the site, but I want to change it for "Inici" (home translated to catalan).
-

- Senior Boarder
- GK User
- Thu Oct 17, 2013 2:16 pm
You can do it by editing template core file:
wp-content/themes/News/gavern/helpers/helpers.layout.php
(or better use child theme to override this file)
and change this line:
to:
wp-content/themes/News/gavern/helpers/helpers.layout.php
(or better use child theme to override this file)
and change this line:
- Code: Select all
echo '<a href="' . home_url() . '" class="gk-home">' . get_bloginfo('name') . "</a>";
to:
- Code: Select all
echo '<a href="' . home_url() . '" class="gk-home">' . 'Your Custom Text' . "</a>";
-

- Moderator
- GK User
- Thu Oct 17, 2013 4:06 pm
Yes, I use a child-theme....it worked.
But the code in helpers.layout.php is slightly different from what you said. So I changed the two instances of "get_bloginfo('name')" that I found in that file:
line 368
In this case I changed the whole pattern "apply_filters('gavern_breadcrumb_home', get_bloginfo('name'))"
line 406
Not sure if this is completely right but it worked.
line 368
- Code: Select all
// return the Home link
$output .= '<a href="' . home_url() . '" class="gk-home">' . apply_filters('gavern_breadcrumb_home', get_bloginfo('name')) . "</a>";
In this case I changed the whole pattern "apply_filters('gavern_breadcrumb_home', get_bloginfo('name'))"
line 406
- Code: Select all
// output the home link only
$output .= '<a href="' . home_url() . '" class="gk-home">' . get_bloginfo('name') . "</a>";
Not sure if this is completely right but it worked.
-

- Senior Boarder
- GK User
- Thu Oct 17, 2013 4:07 pm
Sorry, I had older file - the Way You did it was 100% correct.
-

- Moderator
- GK User
- Thu Oct 17, 2013 6:56 pm
Fine. Thanks!
-

- Senior Boarder
5 posts
• Page 1 of 1
