• Sogwap

    (@sogwap)


    I tried changing the slug from /docs/ to /faq/
    But it did not work properly.

    I would think this would be a basic option as part of the plugin.
    The snippet that you provided partially worked but produced an error.

Viewing 1 replies (of 1 total)
  • Hi @sogwap, sorry for the delay.

    Try adding the following snippet to your site

    add_filter( 'register_post_type_args', 'kb_register_post_type_args', 10, 2 );
    function kb_register_post_type_args( $args, $post_type ) {
    
        if ( 'docs' === $post_type ) {
            $args['rewrite']['slug'] = 'faq';
        }
    
        return $args;
    }

    It works on my end. You might need to refresh the Permalinks after adding the snippet, as I do.

    Let us know if you need more help, otherwise please mark the topic as Resolved.

    Kind regards,
    Herman ??

Viewing 1 replies (of 1 total)
  • The topic ‘Changing /docs/ to /faq/ not working’ is closed to new replies.