{"id":2115474,"date":"2011-06-04T20:35:02","date_gmt":"2011-06-04T20:35:02","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/highlight-menu-item-based-on-current-post\/"},"modified":"2016-08-20T00:43:25","modified_gmt":"2016-08-20T00:43:25","slug":"highlight-menu-item-based-on-current-post","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/highlight-menu-item-based-on-current-post\/","title":{"rendered":"Highlight menu item based on current post."},"content":{"rendered":"<p>Hello. I&#8217;d like to highlight an item on the wordpress navigation menu (these are all pages) based on the current post. For instance, I have 5 pages in the nav menu which are 5 people (authors), what I want to do is that when you open a post, if it&#8217;s written by author #1, then keep the menu #1 highlighted. I don&#8217;t have any clue as how to do this, all the other information regarding highlighting is for current pages or post categories, which do not interest me.<\/p>\n<p>If it can&#8217;t be done by author ID, any other way is fine, like adding a custom field to each post maybe?<\/p>\n<p>Well, thanks anyway, I&#8217;d really like to get this done since our blog is almost finished.<\/p>\n","protected":false},"template":"","class_list":["post-2115474","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2115474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2115474\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=2115474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}