Support » Fixing WordPress » Using is_tree for Dynamic Menu

  • Hi.

    I’ve added the is_tree function to the ‘functions.php’ and I’m calling it into my menu using:

    <li<?php if (is_tree('portfolio')){ echo " class=\"current\"";}?>><a href="http://domain.com/portfolio/">Portfolio</a></li>

    I want this to add class=”current” on the portfolio page and the pages nested within portfolio. The problem is, it’s adding class=”current” on every page on my site apart from the nested pages in portfolio.

    Any help would be greatly appreciated.
    mr.sly x

  • The topic ‘Using is_tree for Dynamic Menu’ is closed to new replies.