This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove archive title prefixes. | |
* | |
* @param string $title The archive title from get_the_archive_title(); | |
* @return string The cleaned title. | |
*/ | |
function custom_archive_title( $title ) { | |
// Remove any HTML, words, digits, and spaces before the title. | |
return preg_replace( '#^[\w\d\s]+:\s*#', '', strip_tags( $title ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp.blocks.registerBlockStyle( 'core/image', { | |
name: 'phader', | |
label: 'Philly Phader' | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: SSP Customizations | |
Plugin URI: https://github.com/TheCraigHewitt/Seriously-Simple-Podcasting | |
Description: Customizations for the Seriously Simple Podcasting Plugin | |
Version: .1 | |
Author: itsjusteileen | |
Author URI: https://github.com/itsjusteileen | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add lines five to 10 to your child theme's functions.php file | |
*/ | |
function change_category_order( $query ) { | |
if ( $query->is_category('8') && $query->is_main_query() ) { | |
$query->set( 'order', 'ASC' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'change_category_order' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'pre_get_posts', 'custom_reverse_post_order' ); | |
function custom_reverse_post_order( $query ) { | |
if ( is_admin() ) | |
return; | |
if ( $query->is_main_query() && is_archive() && ! is_post_type_archive() && ($query->query_vars['category_name'] == 'category-name' || $query->query_vars['category_name'] == 'category-name') ) { | |
$query->set( 'orderby', 'date' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not include in PMPro Customizations plugin | |
/** | |
* Have members use their email address for logging in to your website powered with Paid Memberships Pro | |
* | |
* Paste the code below into a PMPro Customization Plugin: | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
add_filter( 'gettext', 'wordpress_login_gettext', 20, 3 ); | |
function wordpress_login_gettext( $translated_text, $text, $domain ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not include this or the doc block if adding to a Customizations plugin | |
/** | |
* Add this to its own folder in your plugins directory or copy the code below this doc block to a Customizations Plugin and customize to suit your needs. | |
* | |
* Plugin Name: PMPro Register Helper Examples | |
* Description: Create a folder name in your plugins' folder with the same name as this filename, but without the .php extension. Save this file in that folder and then you can activate this plugin in your WordPress dashboard, | |
* Author: pbrocks | |
* Author URI: https://github.com/pbrocks | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'wps_load_scripts' ); | |
/** | |
* Enqueue Isotope | |
* For commercially developed child themes, you must obtain a license | |
* from isotope.metafizzy.co for approx. $25. | |
* | |
* @author Travis Smith | |
* @link http://wpsmith.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'ssp_episode_meta_details', 'ssp_remove_download_link', 10, 3 ); | |
function ssp_remove_download_link ( $meta, $episode_id, $context ) { | |
unset( $meta['link'] ); | |
return $meta; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Add categories support to the SSP plugin. Include this code in a blank customizations plugin for your site. If you already have a plugin, do not add the php opening tag in line one, only add code beginning at line 6. | |
*/ | |
add_action( 'pre_get_posts', 'ssp_add_podcast_to_category_archives' ); | |
function ssp_add_podcast_to_category_archives( $query ) { | |
if ( is_admin() ) { | |
return; |
NewerOlder