Add Anchor Text To Home Icon

Hello Guys.

I would like to be able to add anchor text to the home icon in the breadcrumb bar. Is this possible? As this link appears on the majority of pages, it would be nice to add a form of anchor text in there.
I know I could change the icon to text but that is only via css and i can’t implement the text into it.

Could you help?

Thanks

Hi There,

Thank you for writing in, you can actually change that home icon to a text using the custom CSS code below.

.x-breadcrumbs .home i.x-icon-home:before {
	content: "Home";
}

Further than that will require a custom development and it’ll be outside of the scope of support that we can offer.

Cheers!

OK Friech,

Not quite the answer I was hoping for. As I said, I knew I could do that but as it’s in css, it’s not classed as text. When you run a crawl over the site, it displays that home icon (Or whatever text is there) as an empty anchor which is REALLY BAD for SEO. I’ll just not use breadcrumbs.

I was hoping you could tell me the line in breadcrumb.php (moved into the equivalent folder in my child theme) or whatever file that I could modify to put the Word “Home” in, so it would be considered text and not style, and therefore be seen as an actual worded Anchor.

X theme is built really well for SEO and this does surprise me that the home icon would be left as an empty anchor as it appears on every single page.

Cheers

Hi there,

Please kindly copy wp-content/themes/x/framework/functions/global/breadcrumbs.php file to your child theme like:

wp-content/themes/x-child/framework/functions/global/breadcrumbs.php

After that kindly find this part of the code: (Line 30)

// Breadcrumb Home Text
// =============================================================================

if ( ! function_exists( 'x_get_breadcrumb_home_text' ) ) :
  function x_get_breadcrumb_home_text() {

    return '<span class="home"><i class="x-icon-home" data-x-icon="&#xf015;"></i></span>';

  }
endif;

and chnage it to:

if ( ! function_exists( 'x_get_breadcrumb_home_text' ) ) :
  function x_get_breadcrumb_home_text() {

    return '<span class="home"><i class="x-icon-home" data-x-icon="&#xf015;"></i> Home</span>';

  }
endif;

Thank you.

Thank you Christopher.

I hadn’t got an email to say this had been updated. I will try this and let you know.

Sure do let us know how this goes!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.