Results 1 to 2 of 2

Thread: Removing Price tag from NO PRICE ADS

  1. #1
    Thread Starter
    Expired Customer designpad46's Avatar
    Join Date
    Apr 2015
    Posts
    41
    Thanks
    0
    Thanked 1 Time in 1 Post

    Removing Price tag from NO PRICE ADS

    We need urgent help removing the Price Tag IF No Price was allowed. We tried some of the code provided by earlier postings in 2010, 2011, 2012 but they are not working anymore. The following is one of the code we tried but not working either.


    // 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">&nbsp;</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' );





    We would really appreciate any help in this matter.

  2. #2
    adtractiebv's Avatar
    Join Date
    Jul 2014
    Location
    Netherlands
    Posts
    236
    Thanks
    8
    Thanked 17 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Removing Price Tag
    By keotray in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 3rd, 2012, 11:59 AM
  2. Removing price field tag
    By rodigital in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: February 24th, 2012, 01:54 AM
  3. Removing the price tag
    By caithnessbay in forum Help Using ClassiPress
    Replies: 1
    Last Post: December 5th, 2011, 08:57 AM
  4. Need Help Removing the Price Tag IF No Price was Inserted
    By andrewlistening in forum ClassiPress General Discussion
    Replies: 1
    Last Post: November 3rd, 2011, 10:27 PM
  5. Removing price
    By k9media in forum Help Using ClassiPress
    Replies: 1
    Last Post: June 3rd, 2010, 05:29 PM