• Resolved yazanabawi

    (@yazanabawi)


    Hi Greg,

    I am trying to implement the “search by category” code as described on your website and snippets on Github.

    I am using a plugin called Snippets to add the code creating the form is working fine, but submitting the form results in


    Oops! That page can’t be found.
    It looks like nothing was found at this location. Maybe try a search?

    Once the search button is clicked, the address bar changes (GET) to reflect the search key word (“test name” in this case), and an advert_category number:

    ___.com/?query=test+name&advert_category=21

    any idea why this is happening?

    In addition to that, under custom forms, if I add a new drop box list manually,(ex: custom_field_14, can it be used in the search? (as a categories)

    Thank you.

    Regards,
    Yaz

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    most likely this is exactly the same problem as explained here https://www.ads-software.com/support/topic/search-by-category-plugin/

    If your custom drop-down will have a value for each option equal to some category id or slug then you will be able to search by category using this field.

    Thread Starter yazanabawi

    (@yazanabawi)

    Thank you Greg, that has resolved the issue!

    I am still a bit unclear on how to also add the customised drop down list as another search filter, i.e to do a search based on two category selections.

    Thank you.

    Regards.

    Plugin Author Greg Winiarski

    (@gwin)

    If you would like to allow users to search by more than one category you should make the category search field a multi-select drop-down instead of adding an additional select field.

    Thread Starter yazanabawi

    (@yazanabawi)

    Apologies if my question was not clear enough, what I meant to say is that I would like to have another search “filter”, for example, let’s assume I am selling shirts, I would like users to be able to search by:

    Colour -> a list of colours (red, blue, green, etc..)
    Size -> a list of sizes (small, medium, large, etc..)

    Plugin Author Greg Winiarski

    (@gwin)

    Ohh i see, the easiest way to do that (especially if you are not familiar with PHP programming) is to use the Custom Fields extension https://wpadverts.com/extensions/custom-fields/, if you have some programming experience you can also create the additional search fields using Forms API https://wpadverts.com/documentation/custom-fields-search-form/

    Thread Starter yazanabawi

    (@yazanabawi)

    Hi Greg, thank you for that, I have actually bought the full extension package last week, that’s why I’m asking ??

    I am struggling a little bit in configuring it to do so.

    Thread Starter yazanabawi

    (@yazanabawi)

    Actually, I may have fingured it out. I will let you know if I have further issues.

    Thread Starter yazanabawi

    (@yazanabawi)

    Hi Greg,

    it works fine, but any reason why the keywords and location text boxes look different to the custom field ones? any way I could make them all look the same?

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, the fields should actually look the same in the search box, can you paste a link or at least a screenshot of the site? It will be much easier then to tell what the problem is.

    Thread Starter yazanabawi

    (@yazanabawi)

    Hi, see the screenshot below:

    https://i.imgsafe.org/00/00a33aaba8.png

    1. You can see how the name and location fields look different (font, size, colour, etc.) to the custom fields

    2. I would like the Radius drop down to be underneath/next to the location dropdown, can this be done?

    Thank you

    Plugin Author Greg Winiarski

    (@gwin)

    1. The field sizes are different because the theme is forcing styling on the drop-down fields, if you can post a link to a page where you have this issue i might be able to help with it.

    2. Currently, i am afraid not, there will be an option to do that in next WPAdverts MAL release.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Search By Category’ is closed to new replies.