Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Display 2 dropdown filters without Search input?
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 2 months ago.
- AuthorPosts
- March 10, 2020 at 2:39 pm #26186
We are trying to create a section that searches within Blog Posts by taxonomy. We want to display 2 dropdown filters. One for Category, and one for a custom Taxonomy (called “Industry”). Do you know what settings we need to adjust to remove the actual search input? We only want 2 dropdowns.
Additionally, is there an area we can go to adjust the “layout’ of each post within the grid? Currently, it’s only showing the image and the excerpt. But we also want to output the title and categories.
We plan to output this onto a particular page via the shortcode method.
Basically, we’d like it to look like this: https://i.imgur.com/UDy3Wy0.png
March 10, 2020 at 4:00 pm #26188Hi,
Sure, you can disable the search bar complete righ here: https://i.imgur.com/IJVit7L.png
Well, I assume you are using an isotopic layout, which is probably not the best choice for that layout. I would rather suggest choosing a theme with “horizontal” layout: https://i.imgur.com/lDE163O.png
In your case it does not really matter which one, as the search bar is not visible either way.Then via custom CSS you can completely ditch the horizontal scrolling if you want to:
.resdrg { width: auto !important; display: flex; flex-wrap: wrap; } .resdrg .item { flex: 0 0 auto; }
This will give you a multi row layout like this: https://i.imgur.com/Bare8YZ.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2020 at 4:11 pm #26189Thanks! I’ll try that out and use some CSS to get it to look closer to our design.
One other question I had is:
I added this to the Description area, to be able to show the categories:
<p class="post-meta">{_taxonomy_category count=2 separator=' '}</p>{descriptionfield}
But how do I wrap the category terms with a link to their actual category term archive page? Is there a better way to insert the categories above the description, so that they can link to the proper location?
March 10, 2020 at 4:19 pm #26191Hi,
I’m afraid the taxonomy links are not available in that context, this is only doable by custom coding. I am not sure how comfortable you are with coding custom hooks, but here is a tutorial for displaying taxonomy terms in results programatically – it should help you to start off.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2020 at 4:35 pm #26192Thanks for that. I’m vaguely familiar with using hooks like these.
However, I’m not able to figure out how to wrap the particular term with its corresponding URL. Would it be feasible to update that Gist (or create a new one) that shows how to go about doing that? I would think the community would also greatly appreciate that, as it seems to be the only thing missing from the plugin.
It’s the last piece we need, before being able to make full use of your plugin.
March 11, 2020 at 9:43 am #26201Try chaning this line:
$out = implode($delimiter, $terms);
to something like:
Best,$out = get_the_term_list( $r->id, $taxonomy, '', $delimiter, '' );
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 11, 2020 at 2:31 pm #26212Excellent! That seems to work great. Thanks so much!
March 11, 2020 at 2:32 pm #26213You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.