我只需要从 TwentyTen 导航菜单中使用的链接中删除 HTML title 属性。
主题头文件调用此
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
我尝试编辑它在导航菜单模板中构建链接的位置.php但它似乎没有任何效果。
答案如下:从WordPress菜单中删除标题属性
或者使用 jQuery 删除它:在标题中.php :
$(function() {
$(“#header a”).removeAttr(“title”);
}
好问题。这是实现这一点的一个很好的参考。
http://www.tryyourselfs.com/tag/remove-wp_nav_menu-a-title-using-jquery
http://erikshosting.com/tag/wp_nav_menu/http://www.dynamicwp.net/articles-and-tutorials/remove-title-attribute-from-wordpress-menu-link/