simple add_filter not working, why?

Home Forums Store Locator Plus simple add_filter not working, why?

This topic contains 2 replies, has 2 voices, and was last updated by  Lance Cleveland 2 years, 7 months ago.

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


    I need to adjust the html from the search form.  Simple, I see from the code in class SLPlus_UI that there is an apply_filters function of slp_search_form_html as the output of the create_DefaultSearchForm function.  So I can just add a filter and we’re good to go.  Well that’s what I thought….

    Can someone explain why this doesn’t work?

    // within functions.php

    add_filter( ‘slp_search_form_html’, ‘my_adj_slp_search_form_html’, 99 );


    function my_adj_slp_search_form_html($html){

    return ‘this should override the search form’;





    • This topic was modified 2 years, 7 months ago by  kristin.


    Anyone? Can’t get the filters from the plugin to work…


    Lance Cleveland

    Coding questions should be posted in the developer forum.


    The filter you have referenced only applies to the default search form layout to be used b the plugin.    This is NOT the same as what is rendered to screen.  That is fetched from persistent storage (the WPDB) as it can be modified by the users via Enhanced Search Search Layout settings or by other plugins.

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

You must be logged in to reply to this topic.