WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
//Geo Map
add_action( 'woo_post_inside_after', 'my_geo_mashup' );
function my_geo_mashup() {
    global $post;
if ( in_category('listings') ) {
        echo GeoMashup::map();

Works to embed my map tag only on my single posts categorized as "listings" But, the embedded tag is also showing within the index of posts (thumb, title, meta, excerpt) and I need to remove it from the loop of posts and have it only show on the single.php


share|improve this question
up vote 3 down vote accepted
if ( is_single() && in_category('listings') ) { 
share|improve this answer
Thanks! I appreciate the answer - works perfect. Question - how would I include css classes to style the element I'm embedding through functions.php – Jason May 2 '11 at 20:14
See this page: codex.wordpress.org/Function_Reference/wp_enqueue_style – tollmanz May 2 '11 at 21:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.