permalink not working correctly
-
Hello,
Just a quick note — I’m using the latest version of the plugin, and permalinks are no longer working correctly.
URLs no longer take the hierarchy into account (parent / child).
For example:domain.com/parent_cat/child_catreturns a 404 error. You need to removeparent_catfrom the URL for it to work.I had to add the following code to my
functions.phpfile to get it working properly:
add_filter('wpsl_store_category_args', function($args)
// Assure que le slug reste identique
$slug = isset($args['rewrite']['slug']) ? $args['rewrite']['slug'] : 'store-category';
$args['rewrite'] = array(
'slug' => $slug,
'with_front' => false,
'hierarchical' => true
);
return $args;
});
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘permalink not working correctly’ is closed to new replies.