• Resolved Karl-Arne

    (@karl-arne)


    Hello.
    What is wrong with this loop? I got syntax error and can’t figure out what is wrong.

    here is my source code:

    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>

    This make an error at the bottom of the file.

    If I comment out like this, the syntax error get away.

    <?php if(have_posts()) // : while(have_posts()) : the_post(); ?>

    or if I replace : with ; the error also go away. But that is not correct use of the loop and display of course nothing.

    I am using Dreamweaver CC on Window 8.1

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Strange error with the Loop’ is closed to new replies.