<?php function idxbroker_dynamic_wrapper_css_tag() { if ( 'idx-wrapper' == get_post_type() ) { echo "\n<!-- IDX CSS -->\n\n"; // IDX Broker detection comment } } add_action('wp_print_styles', 'idxbroker_dynamic_wrapper_css_tag');