2014-03-14, 06:44:48
(2014-03-12, 10:13:06)TeeJay Wrote: I have discovered an obvious issue with using nm_show_tag('foo') for to replace "categories" of articles in your main menu. As all those articles under specified "categories" actually belong to "news" menu item (or any other, but it's always only 1 of the categories), whenever you click onto any of articles from anywhere, you'll always loose the current class on the "category" you were looking at. Instead, "news" category gets chosen. It's logical and obvious, I just didn't think of it before, so I wanted to point it out.
I am adding another conditional function (nm_post_has_tag) that will allow checking if the current single post has a given tag.
So you'll be able to use it for what you say, like:
Code:
if (nm_post_has_tag('foo'))
get_navigation('foo-page');
else
get_navigation(return_page_slug());