Creating search instances that use a Category as the search source

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Creating search instances that use a Category as the search source

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41814
    Suzanne Paschall
    Suzanne Paschall
    Participant

    I would like to create a search instance to search from a page from one category. In other words, from this archive, when a person goes to the Photographs page, all the photographs appear, and I would like them from here to be able to search within that category of Photographs using keywords.

    I’ve created a new search instance, and installed the shortcode on the page with elementor, but don’t know how to style it to only use posts categorized as Photographs as the search source.

    I’ve attached an example of what I’m trying to create. When the person lands on the Photographs page, I have this text above the in-page search bar (not styled yet): “You can use the search box below to search for specific images using keywords like names, years, or places to narrow your search.”

    If you can help me achieve this, I will mimic it for other categories where there are hundreds of items (i.e. Letters for now).

    I think there is also a way to create a “subsearch” directly from the main search (Right Sidebar (“Search the Archives”), and maybe that’s preferred to creating separate search instances, i.e. “Alice Cairns” (tags/keywords) + “Photographs” (category), but I think it might be more user-friendly to have in-category searches done on their related pages.

    Can you please give me steps to do this? Thanks so much!

    Attachments:
    You must be logged in to view attached files.
    #41862
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    If you don’t have too many of these pages, then probalby the best option is to create seaparate search bars with different configurations, restricting the search results to the desired categories. I think this is the easiest and fastest ways to achive this.

    Otherwise this can only be resolved programmatically.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.