WordPress.org

Forums

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

  1. indira14
    Member
    Posted 1 year 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:

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

    https://wordpress.org/plugins/php-code-widget/

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

    Posted 1 year 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

Tags

No tags yet.