html being added when php if statements are false.
-
Hi there,
Just wanted to let you know, there are numerous places where the following code occurs:
<?php if( somethingorother() ) : ?> <li class="classname"> ... some conditional element, normally <a>...</a> <php elseif( somethingelse() ) : ?> <li class="a different classname"> ... some alternative conditional element, normally <a>...</a> <?php endif; ?> </li>
If both if statements return false, the generated html output always contains the closing li, thus invalidating the html.
You need to either use if..elseif..else, or put the closing li into both conditional operations.
I notice this particularly in the nav.php file.
Don’t get me wrong – I think the majority of your work is great and have found it immensely useful, just thought this might be helpful to mention.
Thanks,
John.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘html being added when php if statements are false.’ is closed to new replies.