Use wp_nav_menu()
with proper parameters to add the dropdown-menu forAnimate
class, to remove the wrapper and to add the role
attribute:
<ul class="nav navbar-nav">
<li class="active"><a href="https://wordpress.stackexchange.com/questions/255497/index.html">Home</a></li>
<li><a href="category.html">Category Page</a></li>
<li><a href="article.html">Article Page</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Category Type A <span class="caret"></span></a>
<?php wp_nav_menu(array(
'menu' => 'my_menu_name', // specify the menu name
'menu_class' => 'dropdown-menu forAnimate', // add classes for the dropdown
'container' => '', // don't wrap the menu in <div>
'items_wrap' => '<ul id="%1$s" class="%2$s" role="menu" >%3$s</ul>',
));?>
</li>
</ul>
'<ul id="%1$s" class="%2$s" role="menu" >%3$s</ul>'
part is intended to keep id
and class
as is and to add the role
attribute.
Not tested, though.
See wp_nav_menu() for more information.