Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter redeclipse

    (@redeclipse)

    I should note that using the Search Everything Plugin, I’ve narrowed down the search results to include only things from Category 26 in the default search bar. Also, when using the Search In Place Plugin’s “MORE RESULTS” link, the results do indeed only show posts of category 26. However the live loading results do not exclude the other categories.

    Thread Starter redeclipse

    (@redeclipse)

    (double post)

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The search in place is applied to all the search boxes in the website by default, and the search will include all pages and posts, but if you want limit the search only to the posts in a the Category 26, follow the steps below:

    1. Open the “/wp-content/plugins/search-in-place/php/searchinplace.clss.php” file with the text editor your choice.

    2. Go to the snippet of code:

    $params = array(
              's' => $s,
              'showposts' => $limit,
              'post_type' => 'any',
              'post_status' => 'publish',
            );

    and edit it as follow:

    $params = array(
              's' => $s,
              'showposts' => $limit,
              'post_type' => 'any',
              'post_status' => 'publish',
              'cat' => 26
            );

    Best regards.

    Thread Starter redeclipse

    (@redeclipse)

    Great, thank you for the fast response!

    Can I ask one other question? If I wanted to search based on TAGS as well as post title names, how can that be done? Does the premium service allow search through Tags as well?

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Yes, with the pro version of the plugin you can search in the post/page data, and the taxonomies associated to the post/page.

    Best regards.

    Thread Starter redeclipse

    (@redeclipse)

    Hello, I just bought the Pro Version and the above code to narrow the search down to cat=26 can no longer be applied. The coding is different from the free version so the above snippet of code no longer exists. What can I add to fix the Pro version?

    Also, the pro search is not picking up tags. Where can I activate this? It is however, picking up individual attachments, which I do not want. Is there a way to just search via Post Titles and its tags? The reason is, I do not want the results to direct link to attachments. I want them to see individual posts/pages of one category only.

    Thank you very much.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Please, contact me through my support page, for send you the modified file of the pro version of the plugin:

    https://wordpress.dwbooster.com/support

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search Only In One Category’ is closed to new replies.