Support » Plugins and Hacks » [Resolved] Conditional code gives parse error

[Resolved] Conditional code gives parse error

  • 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?


Viewing 1 replies (of 1 total)
  • Plugin Author Samuel Wood (Otto)


    WordPress.org Tech Dude

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Conditional code gives parse error’ is closed to new replies.