Support » Plugin: AMP for WP - Accelerated Mobile Pages » Conditionals IF NOT > RETURN issue

  • 1. design3, featured-image.php – first div is before conditional, when is featured not set, then in code is only this orphan open div.

    2. bad RETURN, very bad …it’s a bit hard to use, so it’s better not to use too much.
    Well, some bad return make my footer disappear on homepage.
    -bad used in frontpage.php files:

    if ( !comments_open() ) {

    This return not only prevent add comment button, but stop executing rest code.

    Simple demonstration:

    Probably in other places, similar used causes the loss of some code, such as closing tags.

    • This topic was modified 4 years, 6 months ago by infokurs.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conditionals IF NOT > RETURN issue’ is closed to new replies.