【发布时间】:2013-01-13 10:08:51
【问题描述】:
在我的管理页面中,我可以将默认模板页面更改为另一个自定义模板。 我需要的是:
在我的导航标题菜单中,我有许多链接,当a 标记指向将使用我的自定义模板而不是默认模板呈现的页面时,我必须设置a 标记的标题属性。示例:
<li><a hreh=".." title="myCustom">link1</a></li> //this title will be redirected with my custom template
<li><a hreh="..">link2</a></li> //this title will be redirected with default template
<li><a hreh="..">link3</a></li> //this title will be redirected with default template
<li><a hreh=".." title="myCustom">link4</a></li> //this title will be redirected with my custom template
如果我打开 header.php 链接创建者:
<?php $params = array(
'theme_location' =>'primary',
'limit' => 5,
'format' => 'custom',
'link_before' => '<span>',
'link_after' => '</span>' );
wp_nav_menu($params);
?>
如何检查链接是由默认模板呈现还是由我的模板呈现?
【问题讨论】:
-
我试着更清楚地编辑帖子.. 等一下 :)
标签: wordpress templates attributes