Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #294929

    Hi there

    Love your theme but having a little issue with getting a filter to fire. We tested using a WP hook/filter for a plugin called Formidable pro on our site using a different theme successfully before copying it over to our client site that uses ENFOLD. We are finding that the hook we are using to modify default behavior for the plugin is not firing

    We have tested the code added to functions.php along with identical setup with three other themes (Avada and Maximus and 2014) and all works as expected. As far as we can tell this is particular to ENFOLD.

    its a very simple little filter that we have used often in other productions with formidable. Its meant to modify/filter the where clause for results looked up by Formidable Pro:

    add_filter(‘frm_where_filter’, ‘starts_with_filter’, 20, 2);
    function starts_with_filter($where, $args){
    if ($args[‘display’]->ID == 6157 and $args[‘where_opt’] == 551){
    $where = str_replace(” ‘%”, ” ‘”, $where);
    }
    return $where;
    }

    This was a little unexpected for us.. we have used ENFOLD for a while and like the theme, however this little problem has us stumped and has left our client in a predicament.

    Any guidance you can offer to ensure this filter fires would be greatly appreciated.

    #295271

    Hey!

    Where in functions.php are you putting this code? are you using a child theme? try changing the priority parameter:

    add_filter(‘frm_where_filter’, ‘starts_with_filter’, 1000, 2);
    function starts_with_filter($where, $args){
    if ($args['display']->ID == 6157 and $args['where_opt'] == 551){
    $where = str_replace(” ‘%”, ” ‘”, $where);
    }
    return $where;
    }
    

    Regards,
    Josue

    #295378

    Hey Josh..

    Thanks for the response. Turned out the function WAS firing.. was a issue deep in the internals of Formidable Pro particulars. Enfold was not at fault at all.

    Again, great theme. Thanks so much for the response. Its nice to see strong customer support from theme developers – really appreciate the time you took to respond given the load you guys all have.

    Kudos and have a great one.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom Filter Not Firing’ is closed to new replies.