• Resolved panaceaoutfits

    (@panaceaoutfits)


    Hello Alberto!

    I was trying to configure my site using the recommendations you gave in the “Disable inheriting blog base permalink” topic.

    Same situation here: WP site with both woocommerce plugin and blog at /blog
    When using the WP permalink settings to have the blog posts at /blog/%post% the brands automatically go to /blog/brand/%brand%

    I’ve pasted the code snippet from the old topic into functions.php of my child theme. It fixed the urls to sitename/%brand% but I get a 404 when accessing the link.

    Please advise.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi panaceaoutfits.

    Try adding this to your functions.php

    
     add_filter( 'register_taxonomy_args', function( $args, $taxonomy ){
       if( 'pwb-brand' === $taxonomy && is_array( $args ) ){
         $args['rewrite']['slug']       = 'shop/brand';
         $args['rewrite']['with_front'] = false;
       }
       return $args;
     }, 99, 2 );
    

    Then refresh your permalink structure.

    ??

    Thread Starter panaceaoutfits

    (@panaceaoutfits)

    AHA! Thank you so much! Works properly now. Thanks for the support and a really nice plugin ??

    Thread Starter panaceaoutfits

    (@panaceaoutfits)

    Issue resolved

    Plugin Contributor titodevera

    (@titodevera)

    You′re welcome! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disabling inheriting blog base permalink causes 404’ is closed to new replies.