Support » Plugin: Geo Mashup » [Geo Mashup] – User filter

  • Resolved Mart456


    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,

    Many thanks


Viewing 1 replies (of 1 total)
  • Plugin Author Dylan Kuhn


    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' );

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Geo Mashup] – User filter’ is closed to new replies.