私の管理ページでは、デフォルトのテンプレート ページを別のカスタム テンプレートに変更できます。私が必要とするのは:
私のナビゲーションヘッダーメニューには多くのリンクがあり、タグがデフォルトのテンプレートではなくカスタムテンプレートでレンダリングされるページを指している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);
?>
リンクがデフォルトのテンプレートまたは私のものでレンダリングされているかどうかを確認するにはどうすればよいですか?