Free Directory, Listing & Classifieds WordPress Plugin › Support › General › HivePress › Display category and attributes in the search form
Display category and attributes in the search form
How can ı change search extension ?
I want to add location manuel and using attributes ?
I can send you an example image are there anybody know ?ihor6 months agodeveloper
If you enable Geolocation extension and set Google Maps API key then the “Location” field will appear automatically https://hivepress.io/docs/extensions/geolocation/ Adding categories to the main search form requires a code snippet, please consider using category selection that is already available in the filter form (on the left side when you search listings).
okey, ı deleted geolocation. I just want to adding 2 select section categories and attributes to my search form. How ? Thank you.ihor5 months, 4 weeks agodeveloper
I’ll add an option to display attributes in the search form to the next version. Meanwhile, you can use this code snippet:
And snippet suggested in this topic for displaying a custom attribute https://hivepress.io/support/topic/list-city/#post-1483mutange345 months, 4 weeks ago
This snippet didn’t work for me?Karim5 months, 1 week ago
Hello ihor, thanks for the snippet.
Can you tell me how to display the categories dorpdown in a correct way.
On my site i have the dropdown list ordered by name also mains categories and sub-categories are mixed.
It it possible to replace the first option by Categories ?
Look here to see what i need https://prnt.sc/siyp11
Thanks you.ihor5 months, 1 week agodeveloper
Yes, you can add the “placeholder” argument to the list of field arguments in this snippet:
'placeholder' => 'Categories',
It will replace the dash. Unfortunately, there’s no simple way to display the category hierarchy in the drop-down yet, this requires further customizations.
Thanks for the snippet ihor.
Can you point me how or where i can look to get the category hierarchy please, at the moment the dropdown is not usable.
Many thanks for all your work.ihor5 months agodeveloper
This requires setting options as an array like this one:
'options' => [ 1 => [ 'label' => 'Category 1', ], 2 => [ 'label' => 'Category 2', 'parent' => 1, ], // ... ],
This requires more customizations, e.g. fetching categories first and organizing them into an array where items reference their parent item.
Yes in know how to do a query in PHP/MSQL to get an array but i don’t know the Wordpres structure. Also in the admin you did it.
Can you tell me the file i can work on to order them? I’m shure other peoples how use the categories in the search need this feature.
Thanks in advance.
ihor i managed to do it thanks
You must be logged in to reply to this topic.