I have the url slush like the below.
/category/land-residential-farm/?property_com_listing_type=sale
I want to write the url to
/category/land-residential-farm/property-for-sale
then re-query the post for sale meta data.
Anyone please kindly point the way
I have the url slush like the below.
/category/land-residential-farm/?property_com_listing_type=sale
I want to write the url to
/category/land-residential-farm/property-for-sale
then re-query the post for sale meta data.
Anyone please kindly point the way
I think you need to first define property_com_listing_type
as a query:
Then you can rewrite the urls with add_rewrite_rule
(do not forget to save permalinks after change):
with a regex like ^category/([^/]+)/([^/]+)/?
Then you can modify the query using pre_get_posts
: