The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[Plugin: Autocompleter] get results for just one category (1 post)

  1. databell96
    Posted 3 years ago #

    I'm new to the Autocompleter plugin and I have it on page currently in development (it's not public, so I can't post a URL). Idea is to create a category archive of posts from just one category. So I make my category template which is category-324.php with 324 being the category ID. Great. Now I include the following code for a search form with the idea being that you can only search that category only.

    <form method="get" id="search form" action="/">
            <input type="text" value="" name="s" id="s" />
            <input type="hidden" value="324" name="cat" id="scat" />
            <input type="submit" id="search_submit" name="Search" value="Search"/>

    So now I test my search form and start typing a name. Autocompleter comes up and looks great. However, it is bringing up results from all the categories. Not just 324 even though I have the hidden value field in my code.

    Is there a way Autocompleter can only bring results from just one category? It would only be for this page (category template) as the rest of the site would have a standard search form to search the entire site on all pages.

Topic Closed

This topic has been closed to new replies.

About this Topic