Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Created January 25, 2016 12:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecodepoetry/632d5a31c03460eacebc to your computer and use it in GitHub Desktop.
Save thecodepoetry/632d5a31c03460eacebc to your computer and use it in GitHub Desktop.
change testimonial slug from child theme
add_filter( 'presscore_post_type_dt_testimonials_args', 'my_testimonials_slug' );
function my_testimonials_slug( $args ) {
$args['rewrite'] = array('slug' => 'mytestimslug');
return $args;
}
@thecodepoetry
Copy link
Author

Add this code in your child theme functions.php to change testimonial slug, replace "mytestimslug" with your custom slug

@constantinosbou
Copy link

For Benefits ?

@sanwarhaider
Copy link

sanwarhaider commented Jan 28, 2018

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;

}

@7einhalb
Copy link

Try to refresh the permalinks at --> Dashboard -> Settings -> Permalinks and press “Save”. This should work.

@DaProp
Copy link

DaProp commented May 13, 2022

Doesn't work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment