如何更改导航菜单中的主页标题文本?(How to change the home page title text in navigation menu?)

编程入门 行业动态 更新时间:2024-10-27 20:31:07
如何更改导航菜单中的主页标题文本?(How to change the home page title text in navigation menu?)

我创建了一个WordPress站点。 主页出现在名称为“Home”的导航菜单中。

我想将此文本更改为其他文本,以便在导航菜单中它不会显示为“主页”,而应该显示为其他文本。

我将如何更改此文字?

I have created a wordpress site. The home page appears in the navigation menu with the name of "Home".

I want to change this text to some other text so that in the navigation menu, it did not appear as a "Home", instead it should appear as some other text.

How will I change this text?

最满意答案

所以,要更改主页按钮的名称,请转到:

WP-包括/后的template.php

寻找:

// Show Home in the menu if ( isset($args['show_home']) && ! empty($args['show_home']) ) { if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] ) $text = __('Home');

你看到最后的“主页”文字吗? 你去那里,把它改变成任何你想要的。

So, in order to Change the name of Home button go to:

wp-includes/post-template.php

Look for:

// Show Home in the menu if ( isset($args['show_home']) && ! empty($args['show_home']) ) { if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] ) $text = __('Home');

Do you see last "Home" text ? There you go, change it to whatever you want.

更多推荐

本文发布于:2023-07-29 20:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1319615.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何更改   文本   标题   菜单中   主页

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!