• I like the organizational properties and the information fields of the WP Store Locator plugin, but have no need for the map that seems to control everything. Also, because the Google Maps API doesn’t work on my local copy of my site, I can’t do any testing or customizing of the Store Locator styles/design.

    Is there any way to remove the map from WP Store Locator’s functionality, so that the only thing the plugin generates is the list of stores organized by state?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Well, yes, but that will take lots of tweaking in the code that I unfortunately don’t have time to write out.

    Are you a bit comfortable with code? Because there’s another way to grab the data from the store locator itself with a few lines of code, so if you’re comfortable with code, then I can point you in the right direction how to make this work.

    Thread Starter montelimarie

    (@montelimarie)

    I think I’m fairly comfortable with code. If you can point me in the right direction, I would definitely appreciate it!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This code will give you a list of ID’s that have a specific state set.

    
    $state = 'your state name';
    
    $args = array(
        'post_type'      => 'wpsl_stores',
        'posts_per_page' => -1,
        'fields'         => 'ids',
    );
    
    $args['meta_query'][] = array(
        array(
            'key'     => 'wpsl_state',
            'value'   => $state,
            'compare' => 'LIKE',
        ),
    );
    
    $ids = get_posts( $args );
    

    You can then use get_post_meta to grab the meta data belonging to that ID and show it wherever you want.

    • This reply was modified 6 years, 7 months ago by Tijmen Smit.

    … I was wondering the same thing. #interested

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Any way to only list the stores?’ is closed to new replies.