Store Directory
This plugin adds a store/location directory to your WordPress site. Once you add stores, you can add the Store Search widget to your widget area or you can add the form to your theme manually. This plugin is intentionally light and simple. It’s very flexible and is intended to be something on which
This plugin adds a store/location directory to your WordPress site. Once you add stores, you can add the Store Search widget to your widget area or you can add the form to your theme manually.
This plugin is intentionally light and simple. It’s very flexible and is intended to be something on which you can build.
Filters
wpsd_radius_options
Param: array( 5, 10, 25, 50, 100 )
This filter allows you to modify the options in the radius dropdown in the store search form. Values are in miles by default.
wpsd_register_post_type
Param: true
This filter allows you to disable the store post type altogether. To do so, simply add add_filter( 'wpsd_register_post_type', '__return_false' ) to your theme or plugin.
wpsd_post_type_args
This filter gives you the ability to modify the arguments passed to register_post_type() for the ‘store’ post type. See register_post_type in the Codex for valid arguments and values.
Param:
array( 'public' => true, 'has_archive' => true, 'supports' => array( 'title' ), 'labels' => array( 'name' => __( 'Stores', 'store-directory' ), 'singular_name' => __( 'Store', 'store-directory' ), 'all_items' => __( 'Stores', 'store-directory' ), 'new_item' => __( 'New store', 'store-directory' ), 'add_new' => __( 'Add New', 'store-directory' ), 'add_new_item' => __( 'Add New store', 'store-directory' ), 'edit_item' => __( 'Edit store', 'store-directory' ), 'view_item' => __( 'View store', 'store-directory' ), 'search_items' => __( 'Search stores', 'store-directory' ), 'not_found' => __( 'No stores found', 'store-directory' ), 'not_found_in_trash' => __( 'No stores found in trash', 'store-directory' ), 'parent_item_colon' => __( 'Parent store', 'store-directory' ), 'menu_name' => __( 'Stores', 'store-directory' ), ) )
wpsd_automap
Param: true
By default, a Google Map is added to the store archive views and store singular views using the 'loop_start' action. This may not be desirable in all circumstances, especially if you loop through your posts multiple times. To disable this, add add_filter( 'wpsd_automap', '__return_false' ) to your theme or plugin. If you choose to disable this, see the wpsd_the_map() tempalte tag to manually display the map.
wpsd_mappable_data
Param:
array( 'name' => $post->post_title, 'address' => get_post_meta( $post->ID, 'address', true ), 'latitude' => $post->latitude, 'longitude' => $post->longitude, 'distance' => $post->distance )
Param: $post