Querying podcasts by publish date
-
Hi, and thanks for your hard work!
I am trying to create a show page, that will query the episodes sorted by the ssp publish date (not the WP post date).
Is there a way to do that? Or any other solution that will prevent the editors from typing the date twice on every post update?
Here’s my code so far (not designed yet ?? ).
<?php get_header();?> <main id="site-content" role="main"> <?php if( $series = get_the_terms( $episode_id, 'series' ) ){ ?> <h1 class="episodeName"><a href="https://podcast.radiosol.co.il/series/<?php echo $series[0]->slug; ?>"><?php echo $series[0]->name; ?></a></h1> <?php echo $series[0]->description; ?> <?php $show_date = isset($instance['show_date']) ? $instance['show_date'] : false; $query_args = ssp_episodes($number, $series[0]->slug, true, 'widget'); $qry = new WP_Query( apply_filters('ssp_widget_recent_episodes_args', $query_args)); ?> <ul> <?php while ( $qry->have_posts() ) : $qry->the_post(); ?> <li> <a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a> <?php if ( $show_date ) : ?> <span class="post-date"><?php echo get_the_date(); ?></span> <?php endif; ?> </li> <?php endwhile; ?> </ul> </main><!-- #site-content --> <?php } ?> <?php get_footer(); ?>
Thanks!
YanivThe page I need help with: [log in to see the link]
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Querying podcasts by publish date’ is closed to new replies.