WordPress.org

Forums

WP Google Maps
[resolved] Code into template / exclude category? (2 posts)

  1. ufopsi
    Member
    Posted 1 year ago #

    Hi, I was wondering if it's possible to do this: I need to embed a map into the loop (blog). The code should be
    <?php echo do_shortcode('[wpgmza id="1"]');?>

    I need to show the map only in one blog category. Is it possible to exclude blog categories?

    http://wordpress.org/plugins/wp-google-maps/

  2. WPGMaps
    Member
    Plugin Author

    Posted 1 year ago #

    Hi
    Sorry for the delay
    What you could do is try this:

    <?php
    if ( in_category( 'pachyderms' )) {
      echo do_shortcode('[wpgmza id="1"]');
    }
    ?>

    Where "pachyderms" is the name of the category

    Does this help?

    Kind regards
    Nick

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Google Maps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic