How can we edit the url of the tdtax app category from newspaper App Find Pro?
For example my current url when visiting a category shows
http://website.com/tdtax_app_category/content-creation/
How can i edit the url slug of App Listings to make a custom or shorter url so it’s more user friendly such as
http://website.com/apps/content-creation/
Thanks for the help!
-
This topic was modified 2 years by
wikiwiseman.
Hi,
Please check this guide https://www.scratchcode.io/how-to-change-custom-post-type-slug-in-wordpress/
Thank you!
It would be nice if it’s possible. I followed the guide provided and nothing happened.
Hello!
Check the documentation here:
https://forum.tagdiv.com/introduction-cpt-acf-newspaper-theme/
After creating your own CPTs, you should change the CPTs field names in the tagdiv Composer too. So, those functions will work on your own CPTs.
Thank you!
After few trails and error.. I was able to make changes with the below code
/*
CHANGE SLUGS OF CUSTOM POST TYPES
*/
function change_post_types_slug( $args, $post_type ) {
/*item post type slug*/
if ( ‘program’ === $post_type ) {
$args[‘rewrite’][‘slug’] = ‘place’;
}
return $args;
}
add_filter( ‘register_post_type_args’, ‘change_post_types_slug’, 10, 2 );
/*
CHANGE SLUGS OF TAXONOMIES, slugs used for archive pages
*/
function change_taxonomies_slug( $args, $taxonomy ) {
/*item category*/
if ( ‘program-category’ === $taxonomy ) {
$args[‘rewrite’][‘slug’] = ‘locations’;
}
return $args;
}
add_filter( ‘register_taxonomy_args’, ‘change_taxonomies_slug’, 10, 2 );