Swoof filter settings

You want to change the URL structure from something like /shop/swoof/brand-caterpillar/ to /shop/?swoof=1&pa_application=caterpillar so you can use wp built in rewrite rules and query parameters. You will need to add custom rewrite rules and handle query parameters accordingly.

add custom rewrite rules to map the desired URL structure to the appropriate query parameters.

Add code in your currently active theme of the functions.php file

1.Add Custom Rewrite Rules

function custom_rewrite_rules() {
    add_rewrite_rule('^shop/swoof/brand-([^/]+)/?', 'index.php?post_type=product&swoof=1&pa_application=$matches[1]', 'top');
}
add_action('init', 'custom_rewrite_rules');

This rule will rewrite URLs like /shop/swoof/brand-caterpillar/ to /index.php?post_type=product&swoof=1&pa_application=caterpillar

2.After adding custom rewrite rules, you need to flush the rewrite rules so that WordPress can recognize them.

Go wp admin area to change the permalink structure Settings > Permalinks and simply click the “Save Changes” button.

URL structure is rewritten, you need to handle the query parameters in your theme or plugin to filter the products accordingly.

you can use WooCommerce hooks or custom query modifications to adjust the product query based on the swoof and pa_application parameters

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino