Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ben Huson

    (@husobj)

    You’ll need to do a bit of coding…

    All markers are stored as WPGeo_Marker objects in an array.
    You’ll need to loop through that array to put the marker information – a bit like this:

    <?php
    global $wpgeo;
    foreach ( $wpgeo->markers->markers as $m ) {
       echo '<p>' . $m->name . '</p>';
    }
    ?>
    Thread Starter kingstakh

    (@kingstakh)

    Its work, but I see only marker names? look. Can add “.name”, “.description”, “.image” but its only show list of properties page. How create list of my map markers with links and Marker Title?

    Plugin Author Ben Huson

    (@husobj)

    Sorry, I misunderstood.

    I thought you wanted to list all the types of marker, like key.

    You would first do a normal WordPress query to get and output your posts.

    Within the loop you can get the current post marker like this:

    $marker = get_post_meta( $post->ID, WPGEO_MARKER_META, true );

    If there is no marker set you should use a default icon:

    $marker = empty( $marker ) ? 'large' : $marker;

    You can then get the WPGeo_Marker for that post:

    $marker_obj = $wpgeo->markers->get_marker_by_id( $marker );

    And in that you will find the marker image url and other variables:

    echo $marker_obj->image

    Does that give you some pointers?

    Thread Starter kingstakh

    (@kingstakh)

    Tnx for reply, but I mean this

    Plugin Author Ben Huson

    (@husobj)

    The plugin doesn’t produce anything like that by default.

    You would need to code it yourself using a WordPress query to create the list of titles, and Javascript to interface with the map.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Marker list’ is closed to new replies.