Include php-based conditional menu in post?
-
I have a conditional menu which I normally use in template files but no longer can since switching too ajax-loading for pages.
I’m wondering if there’s a way it can be added to posts/pages instead.
(In the code below, actual links have been replaced with #.)
<ul class="tabs"> <li<?php if (is_page('mon')) { echo " class=\"current\""; }?>><a href="#">Mon</a></li> <li<?php if (is_page('tue')) { echo " class=\"current\""; }?>><a href="#">Tue</a></li> <li<?php if (is_page(wed)) { echo " class=\"current\""; }?>><a href="#">Wed</a></li> <li<?php if (is_page(thu)) { echo " class=\"current\""; }?>><a href="#">Thu</a></li> <li<?php if (is_page(fri)) { echo " class=\"current\""; }?>><a href="#">Fri</a></li> <li<?php if (is_page(sat)) { echo " class=\"current\""; }?>><a href="#">Sat</a></li> <li<?php if (is_page(sun)) { echo " class=\"current\""; }?>><a href="#">Sun</a></li> </ul>
The topic ‘Include php-based conditional menu in post?’ is closed to new replies.