PHP Code Widget
[resolved] Conditional code gives parse error (2 posts)

  1. indira14
    Posted 2 years ago #

    Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /home/toko4a1q/public_html/wp-content/plugins/php-code-widget/execphp.php(27) : eval()'d code on line 7

    I am getting this error when trying to use a conditional code:

    if(ICL_LANGUAGE_CODE=='en'); ?>
    Sign up for our newsletter to receive news on new products, events and more.'

    <?php echo do_shortcode('[newsletter_form]'); ?>

    <?php endif; ?>

    <?php if(ICL_LANGUAGE_CODE=='ne'); ?>
    Meld u hier aan voor nieuwsbrieven met nieuwe producten, evenementen en meer.

    <?php echo do_shortcode('[newsletter_form]'); ?>

    <?php endif; ?>

    What am I doing wrong?


  2. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Author

    Posted 2 years ago #

    You have an incorrect semi-colon after your if statements. That should be a colon instead.

    This forum is not intended for general PHP advice and help. Please look elsewhere for general PHP errors and solutions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.