I was wondering if there is a way to modify the way search results are presented.
I’m trying to customize the search result templates based on the post type. Specifically, I would like to render each search result using a different template depending on whether it’s a blog post, a page, or a custom post type.
As I understand this, it could be accomplished through some sort of action or filter that could be responsible for setting the path to the template… ??? Or having multiple result.twig templates ??? But I’m not sure how I could implement this.
Could you point me in the right direction?
Thank you for your time and assistance.
This topic was modified 1 month, 1 week ago by pridigital. Reason: new idea