Display 2 dropdown filters without Search input?

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 Ernest Marcinko 2 years, 5 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #26186
    Freshy Sites
    FreshySites
    Participant

    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

    #26188
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #26189
    Freshy Sites
    FreshySites
    Participant

    Thanks! 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?

    #26191
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #26192
    Freshy Sites
    FreshySites
    Participant

    Thanks 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.

    #26201
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Try chaning this line:

    $out = implode($delimiter, $terms);

    to something like:

    $out = get_the_term_list( $r->id, $taxonomy, '', $delimiter, '' );

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #26212
    Freshy Sites
    FreshySites
    Participant

    Excellent! That seems to work great. Thanks so much!

    #26213
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.