Forums Forums Search & Filter Pro Removing Parentheses

Tagged: 

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

    Great plugin. Great support. (You just solved the last case I posted 🙂

    This question is waaay more petty.

    I’ve been happily styling the filters and results. Tiny detail: I’d prefer not to have parentheses around the count that accompanies each filter term. Any advice for making that happen?

    Thanks again for your help!

    Trevor
    #176354

    They are hard coded into our core PHP, so it would be inadvisable to try to remove them, as any plugin update would re-instate them. The only thing I can think of is that you could write some custom javascript to manipulate the text strings in the fields in question. Not an easy task, and outside our support remit.

    Anonymous
    #176884

    Say I was willing to do the inadvisable, could you point me to the file where that is hardcoded? Thanks again for the help and advice.

    Trevor
    #176924

    Ross (the developer) just pointed out to me that we have a filter you could use.

    D’oh.

    https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Filter_Input_Object

    See this Gist:

    https://gist.github.com/rmorse/7b59b45a14b1ca179868

    See the part around line 33 tests if it has options. You could use PHP to search and replace the two brackets. So we run a loop thought the options, starting like this:

     foreach($input_object['options'] as $option) {
    
    Anonymous
    #176947

    You guys are the *opposite* of the usual frustrating tech-support. Thanks again for your help. You can mark this one resolved too.

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