• Hey,
    I’m looking for a way to search only in a single category.
    I tried index.php?s=SearchText&cat=2 (category number)
    But it still shows up all the posts from the other categories.
    Some help is welcome.
    Thanks – ANSARI X PRIZE Space Race Blog admin:
    https://hhboard12.free.fr/xprize/index.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • The search functions in WP need a lot of work in my opinion, but I’m sure their time in the sun will come soon. ??
    As for the present day, you could use google. Something like https://google.com/search?site=yoursite.com&allinurl=category/my-category.
    The html would be trivial and a plugin could be made to allow users to select the category (how were you managing that btw?). Could be fun!
    Not the prettiest solution, but it works.

    Thread Starter Anonymous

    No one ever made the search to work with &cat=(current cetagory) ?..
    Well, for the categories I just added links on the left and edited the code of the (archives) that it includes the &cat of the current page in the url of it.. and with search I added a hiden object with cat tag.. only the search code isn’t working with teh &cat tag…
    You can see it over here: https://hhboard12.free.fr/xprize/index.php
    Help is welcome… for the search.. any word press developers over here ?

    Do you mind posting the code for what you did? I’m trying to do something similar, and yours seems to be working pretty well (?).

    Thread Starter Anonymous

    I’ll release it next week, when I have more time.

    Thread Starter Anonymous

    Sorry for my late answer..
    you can download my main page code at https://www.xprizenews.org/index.download

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search inside a single “$cat” (category)’ is closed to new replies.