Skip to content

Instantly share code, notes, and snippets.

@TheCraigHewitt
TheCraigHewitt / functions.php
Created Jul 31, 2019
Seriously Simple Podcasting - Disable style sheet associated with RSS feed pages
View functions.php
<?php
add_filter( 'ssp_enable_rss_stylesheet', '__return_false' );
@TheCraigHewitt
TheCraigHewitt / functions.php
Created Jul 27, 2019
Seriously Simple Podcasting: Modify podcast archive slug
View functions.php
add_filter( 'ssp_archive_slug', 'ssp_modify_podcast_archive_slug' );
function ssp_modify_podcast_archive_slug ( $slug ) {
return 'new-slug';
}
@TheCraigHewitt
TheCraigHewitt / functions.php
Created Jul 27, 2019
Seriously Simple Podcasting: Modify podcast feed slug
View functions.php
add_filter( 'ssp_feed_slug', 'ssp_modify_podcast_feed_slug' );
function ssp_modify_podcast_feed_slug ( $slug ) {
return 'new-slug';
}
@TheCraigHewitt
TheCraigHewitt / functions.php
Created Jul 27, 2019
Seriously Simple Podcasting: Modify number of episodes that appear in podcast RSS feed
View functions.php
add_filter( 'ssp_feed_number_of_posts', 'ssp_modify_number_of_posts_in_feed' );
function ssp_modify_number_of_posts_in_feed ( $n ) {
return 25; // Where 25 is the number of episodes that you would like to include in your RSS feed
}
@TheCraigHewitt
TheCraigHewitt / functions.php
Created Jul 27, 2019
Seriously Simple Podcasting: Switch off the use of post tags on podcast episodes
View functions.php
add_filter( 'ssp_use_post_tags', '__return_false' );
@TheCraigHewitt
TheCraigHewitt / functions.php
Last active Dec 6, 2021
Seriously Simple Podcasting: Add blog categories to podcast episodes (admin).
View functions.php
add_action( 'init', 'ssp_add_categories_to_podcast', 15 );
function ssp_add_categories_to_podcast () {
register_taxonomy_for_object_type( 'category', 'podcast' );
}
@TheCraigHewitt
TheCraigHewitt / function.php
Created Jul 27, 2019
Seriously Simple Podcasting: Get audio player for specific episode.
View function.php
global $ss_podcasting;
$audio_player = $ss_podcasting->episode_meta( $episode_id );
@TheCraigHewitt
TheCraigHewitt / cache-exclusion
Created Jul 27, 2019
Seriously Simple Podcasting: String to exclude episode files from W3 Total Cache as well as WP Super Cache
View cache-exclusion
/podcast-download/.+
/podcast-player/.+
@TheCraigHewitt
TheCraigHewitt / functions.php
Last active Dec 6, 2021
Seriously Simple Podcasting: Add blog categories to podcast episodes (frontend).
View functions.php
add_action( 'pre_get_posts', 'ssp_add_podcast_to_category_archives' );
function ssp_add_podcast_to_category_archives( $query ){
if( is_admin() ) {
return;
}
if( $query->is_tax('category') || $query->is_category()) {
$query->set('post_type', array( 'post', 'podcast' ) );
}
@TheCraigHewitt
TheCraigHewitt / .htaccess
Created Jul 27, 2019
Seriously Simple Podcasting: .htaccess line for FastCGI servers to enable password protection for feeds. This line to be added above the WordPress rules in the .htaccess file.
View .htaccess
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]