[英]How to change text Home to icon Home on Wordpress? Please help me
I want to edit the breadcrumbs of website (MH Themes).我想编辑网站的面包屑(MH 主题)。 It only is change the ' text Home ' (in echo line) to ' icon Home ' ().它只是将'文本主页'(在回显行中)更改为'图标主页'()。 I have try a ten times but I can't.我已经尝试了十次,但我不能。 Please help me!请帮我! Please!请!
<?php
/***** Breadcrumbs *****/
if (!function_exists('mh_magazine_breadcrumb')) {
function mh_magazine_breadcrumb() {
if (!is_home() && !is_front_page()) {
global $post;
$mh_magazine_options = mh_magazine_theme_options();
if ($mh_magazine_options['breadcrumbs'] == 'enable') {
$item_counter = 1;
$delimiter = '<span class="mh-breadcrumb-delimiter"><i class="fa fa-angle-right"></i></span>';
$before_link = '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">';
$before_title = '<span itemprop="name">';
$close_span = '</span>';
echo '<nav class="mh-breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">' . $before_link . '<a href="' . esc_url(home_url()) . '" itemprop="item">' . $before_title . esc_html__('Home', 'mh-magazine') . $close_span . '</a>' . '<meta itemprop="position" content="' . $item_counter . '" />' . $close_span . $delimiter;
$item_counter++;
This is what's creating the Home text:这就是创建主页文本的原因:
esc_html__('Home', 'mh-magazine')
That needs to be changed into the icon you want to display.这需要更改为您要显示的图标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.