Skip to content

Instantly share code, notes, and snippets.

@TheCraigHewitt
TheCraigHewitt / gist:2fd8eee90c91dd16a4a1e176fd6b394c
Created April 6, 2026 18:42
Opencode connector to LMstudio Gemma 4 model
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"custom": {
"models": {
"gemma-4-e4b": {}
},
"options": {
"baseURL": "http://localhost:1234/v1",
"apiKey": "lm-studio"
@TheCraigHewitt
TheCraigHewitt / functions.php
Created July 31, 2019 09:40
Seriously Simple Podcasting - Disable style sheet associated with RSS feed pages
<?php
add_filter( 'ssp_enable_rss_stylesheet', '__return_false' );
@TheCraigHewitt
TheCraigHewitt / functions.php
Created July 27, 2019 17:34
Seriously Simple Podcasting: Modify podcast archive slug
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 July 27, 2019 17:33
Seriously Simple Podcasting: Modify podcast feed slug
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 July 27, 2019 17:32
Seriously Simple Podcasting: Modify number of episodes that appear in podcast RSS feed
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 July 27, 2019 17:32
Seriously Simple Podcasting: Switch off the use of post tags on podcast episodes
add_filter( 'ssp_use_post_tags', '__return_false' );
@TheCraigHewitt
TheCraigHewitt / functions.php
Last active December 6, 2021 12:34
Seriously Simple Podcasting: Add blog categories to podcast episodes (admin).
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 July 27, 2019 17:30
Seriously Simple Podcasting: Get audio player for specific episode.
global $ss_podcasting;
$audio_player = $ss_podcasting->episode_meta( $episode_id );
@TheCraigHewitt
TheCraigHewitt / cache-exclusion
Created July 27, 2019 17:29
Seriously Simple Podcasting: String to exclude episode files from W3 Total Cache as well as WP Super Cache
/podcast-download/.+
/podcast-player/.+
@TheCraigHewitt
TheCraigHewitt / functions.php
Last active December 6, 2021 12:34
Seriously Simple Podcasting: Add blog categories to podcast episodes (frontend).
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' ) );
}