• Resolved nathandegrave

    (@nathandegrave)


    I’m honestly shocked that nobody has asked this question.

    How do I change /wpp_review/ slug to review or reviews? Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    @nathandegrave you can paste the below code snippet in your theme’s functions.php to change wppr_review to review

    
    add_filter( 'register_post_type_args', 'wppr_register_post_type_args', 10, 2 );
    function wppr_register_post_type_args( $args, $post_type ) {
    	if ( $post_type === 'wppr_review' ) {
    		$args['rewrite'] = array('slug' => 'review');
    	}
    	return $args;
    }
    
    Thread Starter nathandegrave

    (@nathandegrave)

    Thank you! Worked brilliantly! Can you also happen to tell me how to do that with the categories and slugs too? I want to remove the wppr_category and tag extension.

    Thread Starter nathandegrave

    (@nathandegrave)

    Or even better if you can show me how to assign default category and tag to review types. Which file is responsible for creating the review post type in the plugin?

    Plugin Contributor contactashish13

    (@rozroz)

    @nathandegrave You can search for register_post_type and register_taxonomy in the source code and change it as you wish to. But any changes to the core file will void our support. I would instead suggest looking at WordPress forums/tutorials that cover such topics and use the appropriate hooks.

    Plugin Contributor contactashish13

    (@rozroz)

    We haven’t heard from you in sometime so marking this as Resolved. If you continue to face an issue, please create a new ticket. We’d be happy to help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change slug in review type’ is closed to new replies.