• Resolved JohnnyDMonic

    (@johnnydmonic)


    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.

    https://wordpress.org/plugins/the-events-calendar/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Brook

    (@brook-tribe)

    Howdy John,

    Thank you so much for reporting this. I will definitely let our devs know so we can fix it. Are there any other files that you are seeing this problem with, or just nav.php?

    – Brook

    Plugin Contributor leahkoerper

    (@leahkoerper)

    It’s been a month, so in accordance with our forum guidelines I’m marking this thread resolved. Thanks for your support!
    ~Leah

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.