WordPress.org

Ready to get started?Download WordPress

Forums

SimpleMap Store Locator
Any shortcodes to display a list of my locations? (3 posts)

  1. FabioCarretti
    Member
    Posted 2 years ago #

    Hey guys,
    does anyone know how to display a list of my locations?

    thx

    http://wordpress.org/extend/plugins/simplemap/

  2. oregonriverchic
    Member
    Posted 1 year ago #

    This would be extremely helpful. Did you hear back on this?

  3. FabioCarretti
    Member
    Posted 1 year ago #

    actually I think that there are no way to use shortcodes to do that, so I solved this problem using wordpress custom post type query:

    <?php
    global $post;
    $i = 0;
    $args = array( 'post_type' => 'sm-location', 'showposts' => number of posts to show, 'sm-category' => 'your-category');
    $myposts = get_posts( $args );
    
    foreach( $myposts as $post ) :	setup_postdata($post); ?>
    
    <a href="<?php echo $post->guid ?>"><?php the_title(); ?></a>
    
    <?php endforeach;  ?>

    cheerz =)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic