Redirect to custom post if custom archive page has just one result?

Question

So i have made a Custom Post Type called cars and 4 taxonomies that i use to make/edit the cars pages. I have a search&filter pro plug-in to help me sort my pages by the 4 taxonomies assigned. It gives me results on the custom archive page i made, using a grid and the search and filter plug-in. My problem is i want the archive to be redirected to the post page of the car if we have only one result in the search archive.

But i need it adapted to custom post types. Can anyone help !?

0
, , , , Lixicus 2 years 2019-12-28T10:48:41-05:00 0 Answers 131 views 0

Leave an answer

Browse
Browse