SimpleMap Store Locator
SimpleMaps Filters (2 posts)

  1. Devin Walker
    Posted 3 years ago #

    I'm wondering how we can filter the labels in the search form? Here's something I'm attempting without avail. Has anyone successfully do this without editing the plugin's core files?

    /* simplemap filters */
    function customLabels(){
        $ffi['state'] = array( 'label' => apply_filters( 'sm-search-label-state', __( '<strong>Province</strong>: ', 'SimpleMap' ), $post ), 'input' => '<input type="text" id="location_search_state_field" name="location_search_state" value="' . esc_attr( $state_value ) . '" />' );
        $ffi['zip']	= array( 'label' => apply_filters( 'sm-search-label-zip', __( '<strong>Postal Code</strong>: ', 'SimpleMap' ), $post ), 'input' => '<input type="text" id="location_search_zip_field" name="location_search_zip" value="' . esc_attr( $zip_value ) . '" />' );
    add_filter('location_search_form', 'customLabels');

    Am I missing something or do I have to edit classes/simplemap.php directly?


  2. erichopf
    Posted 3 years ago #

    Have you tried looking at the shortcodes? This might be just the thing you need and easier then hacking the plugin, plus you won't have to redo things whenever the plugin is updated. Look for the file on your server or under plugin> editor> simplemap/classes/shortcodes.php Hope that helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SimpleMap Store Locator
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic