WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. indira14
    Member
    Posted 5 months 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)
    Tech Ninja
    Plugin Author

    Posted 5 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.