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.

closed as unclear what you're asking by fuxia Jan 14 '14 at 16:49

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


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.