Hi,
the homelink in the breadcrumbs is a image of a house. I would like to change this to text.
How can i do that?
Thanks
Hi,
the homelink in the breadcrumbs is a image of a house. I would like to change this to text.
How can i do that?
Thanks
Hi,
To achieve that, You can add the code below in your child theme’s functions.php file located at wp-content/themes/x-child
/* Change Home Icon to Text */
function x_breadcrumbs() {
$args_items = array(
'item_before' => '',
'item_after' => '',
'label_before' => '',
'label_after' => '',
'delimiter_before' => ' <span class="delimiter">',
'delimiter_after' => '</span> ',
'delimiter_ltr' => '<i class="x-icon-angle-right" data-x-icon-s=""></i>',
'delimiter_rtl' => '<i class="x-icon-angle-left" data-x-icon-s=""></i>',
'current_class' => 'current',
'anchor_atts' => array(),
'include_meta' => false,
);
$args_data = array(
'home_label' => '<span class="home">Home</span>',
);
if ( x_get_option( 'x_breadcrumb_display' ) ) {
echo '<div class="x-breadcrumbs">' . x_breadcrumbs_items( x_breadcrumbs_data( $args_data ), $args_items ) . '</div>';
}
}
function x_get_breadcrumb_home_text() {
return '<span class="home">Home</span>';
}
Please add this code after this line
// Additional Functions
// =============================================================================
Hope that helps
my child theme functions.php looks like this
<?php add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); function my_theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } ?>When i add your code a couple rows underneed and refresh, the code shows up on the top of my website in the backend and front end.
breadcrumbs did not change.
Thanks
Hi There @me9
You need to download X child theme from your Themeco dashboard and setup it correctly before adding any changes to the child theme. Please refer to our child theme setup guide here (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).
Make sure to activate your child theme before testing.
Hope that helps.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.