Searching Categorized Pages

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Searching Categorized Pages

This topic contains 3 replies, has 2 voices, and was last updated by

 
Keymaster
5 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9677

    Participant

    Hi, I know this is probably a silly question, but wondering if you can help me.

    I have a number of pages in a category. (Using a plugin, added categories for pages.) I’d like to create a search instance that allows me to only search that category of pages. Is this possible? If not, is there another way to do it? Tags? How can I search a subset of pages?

    #9682

    Hi!

    On the back-end you can configure the plugin to exclude certain categories, but it’s not the most convenient solution, because if you add new categories, you will always have to exclude those as well. (Advanced Options -> Exclude results panel) For older plugin versions (pre 4.9.3) this is the only option.

    Plugin version 4.9.3 and further:

    A better solution is to put the following code to the functions.php file in your current theme directory:

    All you need to do is change the $category_id variable to the category ID you need.

    Best,
    Ernest Marcinko

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


    #9686

    Participant
    You cannot access this content.
    #9690

    Yes, I think so. Try this modification:

    Change the $category_ids and the $post_tag_ids to the category and post_tag IDs you want to include the pages from.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.