如何从导航项的标题属性中删除类别描述

How can i remove the category description from the nav item's title attribute

我目前正在网站上工作 https://barwareandmore.com.au,

如果您单击左侧导航栏中的任何项目,然后将鼠标悬停在另一个项目上,您可以看到 link 的 title 属性包含该类别的描述。

此代码也反映在所有页面的源代码中(因此造成重复内容)

有没有办法从这些 link 中删除标题属性?或者将它们设置为无值?

我正在使用达芬奇主题

对不起,我不能更具体,仍然是 wordpress 的菜鸟,

感谢任何 help/advice/suggestions :]

我下载了主题,看了看。

转到您的主题文件,在 products 文件夹中寻找 cat-menu.php 我相信,然后寻找这个:

$product_cat_menu = wp_list_categories( array(
'taxonomy' => 'product_cat',
'show_count' => 1,
'hide_empty' => 1,
'echo'=> 0,
'title_li' => sprintf('<h3>%s</h3>', __('Categories', 'ami3')),
'link_before' => '<span class="main-el-icon"></span>'
) );

并添加 'use_desc_for_title' => 0,这基本上告诉查询不要在标题中包含描述。所以最后会是:

$product_cat_menu = wp_list_categories( array(
'taxonomy' => 'product_cat',
'show_count' => 1,
'hide_empty' => 1,
'echo'=> 0,
'title_li' => sprintf('<h3>%s</h3>', __('Categories', 'ami3')),
'link_before' => '<span class="main-el-icon"></span>',
'use_desc_for_title' => 0
) );