• Resolved 9ball

    (@9ball)


    Free Version – is their anyway to remove the “Apply” button and only have a “Reset Button” only

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support fesupportteam

    (@fesupportteam)

    Hi @9ball

    Thank you for your interest in the Filter Everything plugin.

    There is a possibility to create a custom reset button, If you remove the apply button from “apply button” mode how can you apply all of the filters that you have chosen?

    You can use this example of the code:

    function reset_filters_button_shortcode() {
    if( class_exists( 'FilterEverything\Filter\UrlManager' ) ){
    $urlManager = new \FilterEverything\Filter\UrlManager();
    $resetUrl = $urlManager->getResetUrl();
    return 'Reset filters';
    }
    return '';
    }
    add_shortcode('reset_filters_button', 'reset_filters_button_shortcode');

    And use the shortcode [reset_filters_button] where you want the reset button to appear.

    Best Regards – Victor

    Thread Starter 9ball

    (@9ball)

    hi,

    sorry can’t seen to get this to work, all i get is text only showing:

    Reset filters

    tested with doing a show todays current date function and shortcode, and everything is working ok, with shortcodes

    Plugin Support fesupportteam

    (@fesupportteam)

    Hi @9ball

    Seems like the code wasn’t full, seems that the text editor changed it

    function reset_filters_button_shortcode() { 
        if( class_exists( 'FilterEverything\Filter\UrlManager' ) ){ 
            $urlManager = new \FilterEverything\Filter\UrlManager(); 
            $resetUrl = $urlManager->getResetUrl(); 
            return '<button class="reset-filters-button"><a href="'.$resetUrl.'">Reset filters</a></button>'; 
        } 
        return ''; 
    } 
    add_shortcode('reset_filters_button', 'reset_filters_button_shortcode');

    Best Regards – Victor

    Thread Starter 9ball

    (@9ball)

    Hi
    thanks working great now, a slight issue the Button seems to be picking up the website buttons colours, but the Reset Button’s text is “Black” plus the text isn’t picking up the website text colours.

    is their anyway to over ride the button colour and text colours

    Filters -> Settings -> Widget Primary colour doesn’t work on this button

    Plugin Support fesupportteam

    (@fesupportteam)

    Hi @9ball

    On no no, it was just an example how you can implement the reset button, in general you can change the button styles the way you need, and place them in lets say Adittional CSS like this – https://prnt.sc/Ji6CjdwEzEAd

    Best Regards – Victor

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Reset and Apply Links Buttons’ is closed to new replies.