How to create a custom search results page

Hi there. I would like to get a custom Search Results page working on my site but am needing some help. I have created the page, pulled in the desired header and footer, added a template through the Layout Builder and assigned the condition “Search Results” “is being viewed”. But where I’m stuck is pulling through the actual search result content.

My site is not currently an e-commerce site, but rather a portal to amazon.com, so what I will be doing is adding listings to my site (each listing will have an image, heading, description and buy now button) then linking each listing to the appropriate Amazon page. Can you please explain the best way to create each listing then how that listing information can be pulled through to the Search Results page? Thanks!

Hello @rhinotago,

Thanks for writing in! You will need to create a custom post type for your listing. Once you have added each listing, it will then be available on the search results page. To get to know more about the custom post type, kindly check out this article first:

Best Regards.

Thanks for your response. I’m very new to this so please excuse the simple questions. I have created a custom post type by following the instructions in the link you provided (the Creating a Custom Post Type Manually method). I have replaced ‘Movies’ with ‘Products’ and replaced the text domain ‘twentytwenty’ with ‘x’.

Firstly, how do I now add listings to a page using this custom post type? Then secondly, what do I need to do with the Search Results page to ensure the search results are displayed?

Hello @rhinotago,

Once you have created the custom post type, in your WordPress dashboard, you should have an additional new menu “Products” and a submenu “Products > New Product” should be present. This is where you can add a product that would serve as your listing.

We have noticed that you are having difficulty setting up your site on what you have in mind. Be advised that our support only covers getting theme setup, bug fixes, and minor cosmetic changes. What you have in mind may require custom development which should be directed to a 3rd-party developer. It is better that you hire someone if you are not familiar with WordPress and coding because from what we are seeing, the site that you have envisioned will require one.

By the way, perhaps this article might be something similar to your idea:

Thank you very much for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.