WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Parse error: syntax error, unexpected T_ENDWHILE (2 posts)

  1. browneandrae
    Member
    Posted 2 years ago #

    I am getting the follow error

    Parse error: syntax error, unexpected T_ENDWHILE in /home/content/88/9177388/html/recover_pages/wp-content/themes/news/single-exhibitions_forms.php on line 10

    when trying to output my custom post type with custom fields, using the advanced custom fields plugin. I am using Genesis News Theme

    Here is my code

    <?php
    remove_action('genesis_loop', 'genesis_do_loop');
    add_action('genesis_loop', 'exhibitions_forms_loop');
    function exhibitions_forms_loop() {

    $loop = new WP_Query( array( 'post_type' => 'exhibitions_forms', 'posts_per_page' => 20 ) ); ?>
    }
    <?php the_field('description_of_business_activity'); ?>
    <?php the_field('company_name'); ?>

    <?php endwhile;?>
    <?php

    genesis();

    What am I doing wrong

  2. browneandrae
    Member
    Posted 2 years ago #

    Figured out I was missing a while.

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic