Extra fields

  • 3 years, 11 months ago #19695

    I have noticed you can change the layout of the search result by tweaking the file
    wpsolr-templates/twig/search/result.twig

    Is there any documentation on this template? Can we use custom fields in this template? (eg woocommerce price or availability) and if yes, how should they be constructed?

    wpsolr
    Keymaster
    3 years, 11 months ago #19698

    You do not need to. All custom fields and attributes can be added to the facets by setting up the screen “2.4 Filter”.

    3 years, 11 months ago #19699

    I do not want to see the extra fields in the facets. I would like to see the price and availability of the books that match the search criteria in the list of search results.

    wpsolr
    Keymaster
    3 years, 11 months ago #19701

    Then you can simply add them in your theme’s search template.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.