Support

Account

Home Forums General Issues ACF Relationships in Custom Post Type Permalink Reply To: ACF Relationships in Custom Post Type Permalink

  • Hi,

    In cases like you, unfortunately the nature of wp’s url, you gonna have to add the rewrite rule yourself.

    You can have a look at add_rewrite_rule.
    https://codex.wordpress.org/Rewrite_API/add_rewrite_rule

    So, your code will look something like:

    
    function custom_rewrite_basic() {
        add_rewrite_rule('^mangas/([^/]*)/([^/]*)/?', 'index.php?chapters=$matches[2]', 'top');
    }
    add_action('init', 'custom_rewrite_basic');
    

    Cheers