W
W
webchup2015-09-27 14:44:56
User navigation
webchup, 2015-09-27 14:44:56

How to close menu in noindex menu using page definition via if else?

Help plz. , the task is to close the main menu from indexing in on all pages except the main one. I display two menus through the condition, one with nofollow, the other without, I need to add the noindex attribute to the "mainnav2" menu, but the error constantly pops up, I don't know what to do anymore:
<?php if (is_front_page()) {wp_nav_menu ('menu= mainnav');} else {wp_nav_menu('menu=mainnav2');} ?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question