Title: loop not displaying
Last modified: April 5, 2019

---

# loop not displaying

 *  Resolved [alextmfk](https://wordpress.org/support/users/alextmfk/)
 * (@alextmfk)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/loop-not-displaying/)
 * Hy everyone,
 * so I don’t know if that counts as developing but I wrote a template part for 
   displaying all posts in category podcast as a list but nothing shows (i only 
   have one post that it could show) I thought of this code as reasonable – seems
   I’m wrong and sorry if the code’s too long:
 *     ```
       <?php
       $args = array(
         'post_type' => 'post',
         'category_name' => 'podcast',
         'post_status' => 'publish',
         'posts_per_page' => -1,
        );
   
       $eps = new WP_Query( $args );
         if( $eps->have_posts() ) :
       ?> <ul>
       <?php
   
             while( $eps->have_posts() ) :
               $eps->the_post();
       $do_not_duplicate[] = get_the_ID(); ?>
                 <li>
       					<div class="">
   
                   <h3><?php the_title(); ?></h3>
   
                   <span><?php the_content(); ?></span>
       					</div>
   
       				 </li>
               <?php endwhile; 
                  wp_reset_postdata();
               ?>
   
   
         </ul>
       <?php
       else :
         esc_html_e( 'No episodes have been found!', 'text-domain' );
       endif;
       ?>
       ```
   
 * Is something fundamentally wrong here or is it a css thing?
 * best regards, Alex
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Floop-not-displaying%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [alextmfk](https://wordpress.org/support/users/alextmfk/)
 * (@alextmfk)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/loop-not-displaying/#post-11396803)
 * Just saw that I had a typo in calling the template-part 😀

Viewing 1 replies (of 1 total)

The topic ‘loop not displaying’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 1 participant
 * Last reply from: [alextmfk](https://wordpress.org/support/users/alextmfk/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/loop-not-displaying/#post-11396803)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
