Hello, so i’ve made a Custom Post Type with CPT UI named Cars with 4 Taxonomies (Brand, Model, Generation, Motor) and i have a custom archive page page in one of the pages section that shows me the results as intended when searching, ,i am using search&filter pro for that. My request is how can i make a function in functions.php in the child theme so that when i have one result in the archive to redirect the user to the posts page instead, so that the user doesn’t have to click the result.
Hey Alexandru,
Thanks for writing in! Just to manage your expectations, this isn’t specifically a theme issue, but rather, your customisation of it which is to redirect the archive page to a post. So whilst I have happily provided you with some guidance above on how to get it working, we cannot provide theme customisation as a general rule, or support custom code solutions provided. Therefore, you might find it helpful to check out the following:
- https://wordpress.org/plugins/search/redirect/
- https://www.wpbeginner.com/beginners-guide/beginners-guide-to-creating-redirects-in-wordpress/
Thank you for your understanding.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.