in my admin page i can change the default template page to another custom template.
What i need is:
In my nav header menu i have many links and i have to set title attribute of a tag when the a tag point to a page that will be rendered with my custom template and not with the default one. Example:
<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
If i open header.php that links are created by:
<?php $params = array(
'theme_location' =>'primary',
'limit' => 5,
'format' => 'custom',
'link_before' => '<span>',
'link_after' => '</span>' );
wp_nav_menu($params);
?>
How can i check if link is rendered by default template or by mine one?
I’m not sure what you are trying to do but about the
titlething, you can easily add that at backend… Appearance > Menus. A sample image below..I’m not sure if this will help but have you tried reading Creating Your Own Page Templates?
So that when you create a page, you can choose what template to use for that certain page. Like this image below,