Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.
//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

thoughts?

share|improve this question

1 Answer 1

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

 
discard

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.