I am attempting to vary URL construction, to make it extra Website positioning-friendly.
I take advantage of HivePress theme/plugin and there’s a filter block? once you use it, the end result will get URL for instance like this
https://instance.com/?_sort=&s=&post_type=hp_listing&_category=3&worthpercent5Bpercent5D=799&worthpercent5Bpercent5D=2599&old_pricepercent5Bpercent5D=999&old_pricepercent5Bpercent5D=3299
However I want it to vary. I’ve tried to make use of add_rewrite_rule, however there isn’t a any end result.
For instance,
add_rewrite_rule( '^_sort/([^/]+)/?', 'index.php?pagename=_sort$matches[1]', 'prime' );
or
operate wpd_filter_rewrite() {
add_rewrite_rule(
'^_sort/([^/]+)/?',
'index.php?pagename=kind=$matches[1]',
'prime'
);
}
add_action( ‘init’, ‘wpd_filter_rewrite’ );
Nonetheless don’t know…