Created
January 25, 2016 12:12
-
-
Save thecodepoetry/632d5a31c03460eacebc to your computer and use it in GitHub Desktop.
change testimonial slug from child theme
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( 'presscore_post_type_dt_testimonials_args', 'my_testimonials_slug' ); | |
function my_testimonials_slug( $args ) { | |
$args['rewrite'] = array('slug' => 'mytestimslug'); | |
return $args; | |
} |
For Benefits ?
For benefits, I used this. but 'Nothing Found' when I tried to visit the archive page.
add_filter( 'presscore_taxonomy_dt_benefits_category_args', 'my_benefits_category_slug' );
function my_benefits_category_slug( $taxonomy_args ) {
$taxonomy_args['rewrite'] = array('slug' => 'benefits-category', 'with_front' => false );
return $taxonomy_args;
}
Try to refresh the permalinks at --> Dashboard -> Settings -> Permalinks and press “Save”. This should work.
Doesn't work for me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this code in your child theme functions.php to change testimonial slug, replace "mytestimslug" with your custom slug