Removing the price tag when using a child theme in Classipress
Hi, I'm using Classipress 3.15 (dev) version and want to remove the price tag from all adverts. (I don't like it)
This is quite easy to do by modifying the parent theme file /includes/theme-actions.php
Remove this line:
<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>
and it's gone.
I'd like to do this in the child theme now... yes I can modify the core file directly, but there must be a better way by using the functions.php file in the child theme diectory to some how unhook it or remove the action.
The theme-actions.php file is this:
* add the ad price field in the loop before the ad title
* @since 3.1.3
*/
function cp_ad_loop_price() {
if ( is_page() ) return; // don't do ad-meta on pages
global $post;
?>
<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
}
add_action( 'appthemes_before_post_title', 'cp_ad_loop_price' );
What do I need to put in the child theme functions.php file to disable this?
Can it be done at all, or should I just edit the core file in an unelegant way?
regards & thanks.