// Unhook default ClassiPress functions
function unhook_classipress_functions() {
remove_action( 'appthemes_before_post_title', 'cp_ad_loop_price' );
}
add_action('init','unhook_classipress_functions');
function cp_remove_loop_price() {
if ( is_page() ) return; // don't do ad-meta on pages
global $post;
if ( $post->post_type == 'page' || $post->post_type == 'post' ) return;
$price = get_post_meta($post->ID, 'cp_price', true);
if (!empty($price) AND ($price>0)){
?>
<div class="price-wrap">
<span class="tag-head"> </span><p class="post-price">
<?php if ( get_post_meta( $post->ID, 'price', true ) ) cp_get_price_legacy( $post->ID );
else cp_get_price( $post->ID, 'cp_price' ); ?></p>
</div>
<?php
} else { ?>
<?php
}
}
add_action( 'appthemes_before_post_title', 'cp_remove_loop_price' );