WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. ufopsi
    Member
    Posted 12 months 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 11 months 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

Reply

You must log in to post.

About this Plugin

About this Topic