I need to add an option in my theme options panel to set a specific custom menu's links all to nofollow.

Does wp_nav_menu() allow this or does it require a custom walker to manually ad rel="nofollow"?

  • Why a nofollow ? Are you concern about search engines following the link ? If is that, you should know that search engines will not index these pages simply because they are behind the log-in function (no password = no access to the page) – user983248 May 7 '12 at 13:21

Advanced Menu Properties

As you can see above, the Advanced Menu Properties are hidden under the Screen Options pull down tab located in the upper-right corner of WordPress Dashboard.

NOTE: Make sure that you are in the Menus screen: http://yoursite.com/wp-admin/nav-menus.php

W.r.t your question, the Link Relationship (XFN) option is what you want "check". Then the appropriate field will show up for each menu item allowing you to define its relationship (rel="____"). You can also leave it blank for some items (meaning, no relationship will be specified).

| improve this answer | |

Some years ago there was the only reason to use rel="nofollow" attribute on internal links — PageRank sculpting. These days are gone forever.

If you don't want some pages to be indexed, use a plugin (e.g. WordPress SEO by Yoast) to add <meta name="robots" content="noindex, follow" /> to the head section of these pages.

| improve this answer | |
  • Google do take notice of nofollow attributes: How does Google handle nofollowed links? "In general, we don't follow them. This means that Google does not transfer PageRank or anchor text across these links." Although they do say this about crawl prioritization: "However, a solid information architecture — intuitive navigation, user- and search-engine-friendly URLs, and so on — is likely to be a far more productive use of resources than focusing on crawl prioritization via nofollowed links." – Tony Apr 26 '16 at 17:38
  • @Tony (...) you have a page with "ten PageRank points" and ten outgoing links, and five of those links are nofollowed (...) Originally, the five links without nofollow would have flowed two points of PageRank each (...) More than a year ago, Google changed how the PageRank flows so that the five links without nofollow would flow one point of PageRank each. Matt Cutts, 2009. That's what I mean. – Max Yudin Apr 27 '16 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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