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 this to your child theme's function.php file. | |
// Make sure you flush the rewrite rules. | |
// On wp cli you can 'wp rewrite flush' | |
// Or goto WordPress Admin > Settings > Permalink and save the settings which will flush the rules. | |
add_filter('business_directory_post_type_args', function($args){ | |
$args['rewrite'] = [ | |
'slug' => '/business-location', | |
]; | |
return $args; |
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( 'wpseo_breadcrumb_links', 'wpse_100012_override_yoast_breadcrumb_trail' ); | |
function wpse_100012_override_yoast_breadcrumb_trail( $links ) { | |
global $post; | |
if (is_tax( 'df_product_category' )) { | |
$breadcrumb[] = array( | |
'url' => get_post_type_archive_link( 'df_wordpress_product' ), | |
'text' => 'Products', |
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( 'wpseo_breadcrumb_links', 'wpse_100012_override_yoast_breadcrumb_trail' ); | |
function wpse_100012_override_yoast_breadcrumb_trail( $links ) { | |
global $post; | |
if ( is_singular( 'sfwd-lessons' ) ) { | |
$course_id = learndash_get_course_id($id); | |
$course_title = get_the_title($course_id); |
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
[yoast-breadcrumb-df][/yoast-breadcrumb-df] |
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
/** | |
* Disable new divi crazy crap code for CPT | |
**/ | |
function disable_cptdivi() | |
{ | |
remove_action( 'wp_enqueue_scripts', 'et_divi_replace_stylesheet', 99999998 ); | |
} | |
add_action('init', 'disable_cptdivi'); |
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
//fonts.googleapis.com | |
//fonts.gstatic.com | |
//www.googletagmanager.com |