• Resolved Jason Ryan

    (@viablethought)


    Hello –

    I just added your plugin to a project and disappointed to find that you have the rewrite rule “with_front” set to true?

    Is there a filter that can be used to change this to false? Our site base is set to /blog/%postname% and the slugs for brands are getting the /blog/ prepended to it and looks goofy. /blog/product-brands/brand-name

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter Jason Ryan

    (@viablethought)

    Hello –

    Nevermind, I have written the following filter to override the default args in the plugin and added to my child theme. Works as inteneded now.

    add_filter( 'register_taxonomy_args', function( $args, $taxonomy ) {
      if( 'yith_product_brand' === $taxonomy && is_array( $args ) )
        $args['rewrite']['with_front'] = false;
        $args['rewrite']['slug'] = "brands";
      return $args;
    }, 99, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Set Rewrite ‘with_front’ to false’ is closed to new replies.