I have a custom post type template and a

    list with several items inside displaying data form advanced custom fields, this is my template code for the list

        <ul class="game-meta-data">
                                <?php if( get_field('release_date') ): ?>
                                    <li><span class="taxo-bold">Release Date: </span><?php the_field('release_date'); ?></li>
                                    <?php else : ?>
                                    <li><span class="taxo-bold">Release Year: </span><?php the_field('release_year'); ?></li>
                                 <?php endif; ?>
                                    <li><span class="taxo-bold">Genres: </span><?php the_field('genres'); ?></li>
                                    <li><span class="taxo-bold">Developer: </span><?php the_field('developer'); ?></li>
                                    <li><span class="taxo-bold">Publisher: </span><?php the_field('publisher'); ?></li>         
                                    <li><span class="taxo-bold game-platforms">Platform: </span><?php echo gameTermLinks(); ?></li>
                                    <?php if ( get_field('psvr_game') ) : ?>
                                    <li><span class="taxo-bold">PSVR: </span><?php the_field('psvr_game'); ?></li>
                                    <?php endif; ?>

    As you can see from the code all

  • elements are inside the ul & /ul

    But, when I refresh the page the last li element is outside of the ul, this is confirmed when inspecting the code in code inspector.


    What is causing this? or am I just missing something really simple? I am going insane right now trying to figure this out.

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Browse other questions tagged or ask your own question.