Forums

Geotag
Map will not show on category archive (2 posts)

  1. alexpchin
    Member
    Posted 1 year ago #

    I cannot seem to get the map to display all markers for all posts in each category.
    I am using this code:

    <?php
     if (is_category()) {
      $category = get_query_var('cat');
      if (class_exists('Geotag')) {
       Geotag::the_geotag('print_map', array('marker_query' => 'cat='.$category));
       }
     }
    ?>

    The map is just not showing?
    The map is showing on individual posts when I include the shortcode [gmap].

    Ideally, I want to add:

    - one map on my homepage showing all of the tagged posts.
    - maps on category archives showing all of the posts tagged in that category

  2. Boris
    Member
    Posted 1 year ago #

    Please have a look at this thread: http://wordpress.org/support/topic/using-geotag-with-themes?replies=4. Perhaps you may try my example first and then change the value for 'marker_query'.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags