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 to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘loop not displaying’ is closed to new replies.