WordPress.org

Ready to get started?Download WordPress

Forums

Geo Mashup
[resolved] [Geo Mashup] - User filter (2 posts)

  1. mjmcgowan
    Member
    Posted 1 year ago #

    Hi all

    i currently have a travel site where each users has their own located posts,

    I would like to create a couple of maps that filter by the authors id e.g

    1) when viewing a single post, or the users profile page a map of their posts is shown.

    2) when on the global map, i would like user to be able to a) filter the map by user, maybe a drop down box or checkbox,b) As part of the display window include a link to the a map filtered by that users posts.

    Any help would be really appreciated,

    http://overlandsphere.com/overland-map

    Many thanks

    Martin

    http://wordpress.org/extend/plugins/geo-mashup/

  2. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    Number 1 should be achievable using a secondary query and a contextual map in your template. For a single post, this might look like

    $post = get_queried_object();
    query_posts( 'posts_per_page=-1&author=' . $post->post_author );
    echo GeoMashup::map( 'map_content=contextual' );
    wp_reset_query();

    in Geo Mashup 1.5 you can use a WP_Query instead:

    $post = get_queried_object();
    $author_query = new WP_Query( 'posts_per_page=-1&author=' . $post->post_author );
    echo GeoMashup::map( array( 'map_content' => $author_query ) );

    Number 2 is possible also with some custom javascript and info window template development, but there isn't a built-in control that does it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags