slug issues
-
Hi, I’ve read a few posts here about changing the slug/permalinks for the brand pages.
The outcome I’m looking for is to change the url from
https://www.greenerlyfe.com/blog/brand/scence/
to
https://www.greenerlyfe.com/eco-brands/scence/
I’ve changed the setting in Woocommerce->Settings->brands->general->slug to “eco-brands”.
I’ve then included the following in my functions.php
function fix271218_pwb_taxonomy_args( $args, $taxonomy, $object_type ) { if ( 'pwb-brand' === $taxonomy && is_array( $args ) ) { /* alter the rewrite with front arg */ $args[ 'rewrite' ][ 'with_front' ] = false; } return $args; } add_filter( 'register_taxonomy_args', 'fix271218_pwb_taxonomy_args', 10, 3 );These settings seem to work however if I then go to Settings->Permalinks->Save to flush the links I get a 404 page against /eco-brands/scence/. The page /blog/eco-brands/scence/ returns correctly.
If I go back to Woocommerce->Settings->brands->general->slug and simply save the settings the /eco-brands/scence/
The 404 error returns ramdonly but is probably linked to when I update plugins which refresh permalinks.
Please help,
Cheers, SteveThe page I need help with: [log in to see the link]
The topic ‘slug issues’ is closed to new replies.