Archived topic
Include Product Price In Mixed Search Results
3 replies · Started by Jesse on October 4, 2022
I've included woocomemrce products, posts, and pages in my search results.
It's working well, but all the results look the same.
I would like to have the products stand out a bit with some product data like price.
Is there a way to customize the result layout by post type? Alternately is there an easy way to include the price on the product results?
Hi Jesse,
Are you using a block element - content template to create the layout of the search result?
Can you link me to a search result page with mixed content?
Hi Ying,
This is the page I'm targeting:
https://botanicalcolors.com/?s=blue&post_type%5B%5D=product&post_type%5B%5D=post&post_type%5B%5D=page
Hi Jesse,
You can use a Block Element - Content Template: https://docs.generatepress.com/article/block-element-content-template/
Then in your template, add a GenerateBlocks Headline Block. Enable Dynamic Data, and set the source to Post meta and field name to _regular_price