When adding a new podcast, WordPress will automatically create an archive, under the link /podcast.

You can also create a custom page for your podcasts archive, to use a custom title and featured image for the header.

Additionally, you may want to add featured contents to the first page of a Podcasts archive, by editing the page with Elementor.

In this section you will learn how to create a custom eam members page.

How to make a custom Podcast archive:

Step 1: In your WordPress admin visit Pages > Add New

Step 2: Give it a title, and choose the template Archive podcast

Step 3: optionally set a featured image. This picture will be used also as cover in the header background, for your chart archive.

Step 4: optionally set custom parameters as Page Header opacity and visibility

Header visibilityMake sure to save before step 5.

Step 5: optionally add custom Elementor contents (we suggest to use the Hide Page Header parameter if you want to build a custom header with Elementor)

Once done, you should save a draft or publish the page, before clicking Edit with Elementor.

Edit archive with Elementor

The custom content will appear above the team archive results, on the first page of your podcasts archive (page 2 and following will display the standard header, as this function is intended for creating a custom entry cover for the members archive).

To display a "Load more" button instead of the classic pagination, please visit Appearance > Customize > Layout and Design > Layout, and enable the Load More pagination.

 

Imported podcasts are not appearing in the archives: fix

If you imported your podcasts from any external RSS feed, chances are they will not appear in the archives. 

To fix this, there is a custom function you can use. This function will copy the publish date as Record date for the podcast, which is required for the extraction by WordPress.

Please, copy this code in the functions.php of your child theme. Once done, visit your site and add ?fixdates=true to the URL.

 

/**
* This piece of code will copy the publish date as podcast date for any existing podcast.
* Is useful if you import many podcasts from external sources
* @var array
*
* USAGE: visit your site and add ?fixdates=true to the URL.
* Outcome: the publish date will be copied in the custom podcast date of regording.
*/
if(isset($_GET)){
if(array_key_exists('fixdates',$_GET)){
$args = array(
'post_type' => 'podcast',
'post_status' => 'publish',
// 'suppress_filters' => false,
// 'ignore_sticky_posts' => 1,
'posts_per_page' => 999,
// 'paged' => 1,
);
$wp_query_special = new WP_Query( $args );
if ( $wp_query_special->have_posts() ) : while ( $wp_query_special->have_posts() ) : $wp_query_special->the_post();
$post_podcast = $wp_query_special->post;
echo $post_podcast->ID;
update_post_meta($post_podcast->ID, '_podcast_date', get_the_date( 'Y-m-d', $post_podcast->ID ) );
echo '<p>'.$post_podcast->ID.' DONE</p>';
endwhile; endif;
wp_reset_postdata();
die('All done');
}
}
/**
* END
*/
?האם התשובה שקיבלתם הייתה מועילה 0 משתמשים שמצאו מאמר זה מועיל (0 הצבעות)