Forums Forums Search & Filter Pro Getting highest-count tags to stay on top for the search results?

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #222409

    Love this plug-in!

    I’m building a system where cafe diners can select their food based on tags: https://www.therefectorycafe.com/tags/

    The initial search page is perfect – the tags are listed with highest count at the top.
    However, my issue is that in the search results, it seems random.

    How can I keep the tags with the highest count on top for the search results?

    Thanks!

    Trevor
    #222440

    As each meal could have more than one tag, it cannot be sorted this way in results, sorry.

    Trevor
    #222442

    One thing you might want to consider is making those tags more like a tag cloud in the form, using custom CSS like this:

    #search-filter-form-9474 .sf-field-tag input {
      display: none;
    }
    #search-filter-form-9474 .sf-field-tag label {
      text-align: center;
      line-height: 1.4em;
      border: 1px solid #666;
      border-radius: 3px;
      padding: 3px 5px !important;
      text-indent: 0;
    }
    #search-filter-form-9474 .sf-field-tag label:hover {
      cursor: pointer;
    }
    #search-filter-form-9474 .sf-field-tag > ul > li {
      display: inline-block;
      margin-left: 5px;
      margin-bottom: 10px;
    }
    #search-filter-form-9474 .sf-field-tag > ul {
      margin-left: -5px;
    }
    #search-filter-form-9474 .sf-field-tag > ul > li.sf-option-active label {
      background-color: #7DA85B;
      color: #fff;
    }
    #search-filter-form-9474 .sf-field-tag .sf-count {
      padding-right: 0;
    }

    The new code would make it look like this in an example search:

    https://www.screencast.com/t/78obilCRbV

    And what it looked like before:

    https://www.screencast.com/t/3l1HZfOJ7

    Anonymous
    #222481

    Wow! Just wow. Amazing!
    What a huge help – it looks AWESOME!!!! Thanks Trevor.

    Really appreciate you going out of your way like this – you didn’t have to write custom CSS code for me – you could have ended your reply after the first sentence.

    Have an awesome week!!

    Trevor
    #222487

    No problem and thanks for letting me know. I will close this thread for now.

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