custom fields acting strange
-
Hi folks,
I’ve got a conditional checking for the existence of a custom field called “hide_sub_navigation”. Now you’ve probably got a good idea of what this custom field is meant to do, if the field exists hide the sub menu.
Here’s why it’s strange (either that or I haven’t fully woken up yet), going by my code it’s working but the wrong way round if you get what I mean. Get a load of this:
<?php if(post_custom('hide_sub_navigation')) {?> <ul id="sub_navigation"> <?php // Code to load sub level navigation. ?> </ul> <?php } else { // do nothing }?>
This code actually hides it when the field is true, whereas when I read the code it should actually show it when it’s true.
Can anybody see what’s going on there? It appears to be contradicting itself.
Cheers,
Robert
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘custom fields acting strange’ is closed to new replies.