I have one custom menu in theme. You can see Buying menu have child archive page. i.e Active Listing. So what I want to do is at the top of the archive page for buying I want to display menu label.

Suppose I am on a page I want to show "Active Listing" at the top of archive list.


Add the following empty div where you want to display current menu label

<div class="menu-label-container"></div>  

and add the following script in footer of the page.

    if(jQuery('#nav li.current-menu-item  a').html())
        jQuery('.menu-label-container').html(jQuery('#nav li.current-menu-item  a').html());       

Tell me whether this solution is working for you or i will find another solution.

  • I want to do it with wordpress functions or php code, not with jQuery, BTW thanks – Ajay Patel Mar 13 '13 at 6:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.