Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Does anyone know how to remove the price field from a category?


  • Simon
    Newbie 4 points
    July 13, 2013 at 10:10 pm

    Does anyone know if or how you can remove the mandatory price field from a category in classifieds theme? I have business listing categories that don’t require a price input.

  • Mark Fail
    Mark Fail
    Super Guru 12,820 points
    July 14, 2013 at 5:29 am

    the file is

    template_classifiedstheme/_item.php

  • Richard
    Richard
    Senior Member 164 points
    July 14, 2013 at 9:29 am

    But when you remove it from the template it will be left out in alle submissions/listings.

  • Ian
    Ian
    Super Guru 1,200 points
    July 14, 2013 at 9:35 am

    That’s what if statements are for.


  • Simon
    Newbie 4 points
    July 14, 2013 at 12:49 pm

    So if i remove it from the template will it remove it from all the submission/listings?

    I don’t want i gone completely, just for certain categories!

    If not, is there a way to at least not make it mandatory?

  • Mark Fail
    Mark Fail
    Super Guru 12,820 points
    July 14, 2013 at 1:00 pm

    There isnt away to simply remove it from certain cats unless you code it in.


  • Simon
    Newbie 4 points
    July 14, 2013 at 1:13 pm

    Fair enough, but can you deselect it from being a mandatory field?

  • Mark Fail
    Mark Fail
    Super Guru 12,820 points
    July 14, 2013 at 4:16 pm

    What the category field?

    At the moment all you see in the admin is all we have, anything else would need to be customized.

  • Richard
    Richard
    Senior Member 164 points
    July 14, 2013 at 5:15 pm

    It is possible to make the price filed optional. I am not sure where but i managed it. If i recall correctly the price field isn’t mandatory. All you need to do is remove the asterix from the template and change somewhere an parameter price mandatory “false”.


  • Simon
    Newbie 4 points
    July 15, 2013 at 6:31 am

    Thanks Richard, How do i get access to the template?

  • Mark Fail
    Mark Fail
    Super Guru 12,820 points
    July 15, 2013 at 7:35 am

    Simon the template files were provided to you when you purchased (and can be re-downloaded in the members area) i think Richard means you need to edit them.

  • Chris
    Chris
    Newbie 4 points
    September 5, 2013 at 2:33 pm

    I realize this is a serious noob question, but I simply want to delete the Price field entirely so that it doesn’t show up on any listing or category.
    I went into the item.php file and deleted the 2 segments that listed price, but it still shows up in my submission form.

    How do I remove it completely?
    Thanks so much!!

  • Chris
    Chris
    Newbie 4 points
    September 5, 2013 at 2:34 pm

    Here is my current item.php file text:

    <?php
    global $userdata;

    // GET THE DEFAULT POST CUSTOM FIELDS
    if($featured == “yes”){ $ex = “featuredlisting”; $btnType = “green”; }else{ $ex = “”; $btnType = “gray”; }

    ?>
    <li class=”<?php echo $ex; ?>” id=”post_id_<?php echo $post->ID; ?>”>

    <?php
    // FEATURED GRAPHIC
    if(get_post_meta($post->ID, “featured”, true) == “yes” && strlen($featured_text) > 1){ ?>
    <div class=”group corner” style=”margin-right:-2px;margin-top:-2px;”>
    <div class=”wrap-ribbon right-edge fork lgreen”><span><?php echo $featured_text; ?></span></div>
    </div>
    <?php } ?>

    <div class=”padbox”>

    <div class=”preview”>

    <?php $status = get_post_meta($post->ID, “itemstatus”, true); if($status == “sold”){ ?>
    <div class=”group corner”>
    <div class=”wrap-ribbon right-corner strip lblue smallr”><span><?php echo $PPT->_e(array(‘ct’,’_sold’)); ?></span></div>
    </div>
    <?php } ?>

    <?php echo premiumpress_image($post->ID,””,array(‘alt’ => $post->post_title, ‘link’ => true, ‘link_class’ => ‘frame’, ‘width’ => ‘160’, ‘height’ => ‘110’, ‘style’ => ‘auto’ )); ?>

    <div class=”pricetag”><?php echo premiumpress_price(get_post_meta($post->ID, “price”, true),$GLOBALS[‘premiumpress’][‘currency_symbol’],$GLOBALS[‘premiumpress’][‘currency_position’],1); ?></div>

    </div>

    <div class=”txtbit”>

    <h1 class=”ititle”>“><?php the_title(); ?></h1>

    <?php if(strlen($tagline) > 1){ ?><h3 class=”cleanme tagline”><?php echo $tagline ; ?></h3><?php } ?>

    <div class=”excerpt”><?php echo get_the_excerpt(); ?></div>

    <div class=”tags1″><?php the_category(‘, ‘) ?><?php if(get_option(“display_search_tags”) ==”yes”){ the_tags( ”, ”, ”); } ?></div>

    </div>

    <div class=”clearfix”></div>

    </div>

    <div class=”actions clearfix”>

    <div class=”pad”>

    button right” href=”<?php the_permalink(); ?>”><?php echo $PPT->_e(array(‘button’,’13’)); ?>

    <?php if(function_exists(‘wp_gdsr_render_article’)){ wp_gdsr_render_article();} ?>

    <?php

    // ADD TO FAVORITES SECTION
    if(get_option(“display_myaccount_fav”) != “no”){ ?>

    <?php if(isset($_GET[‘pptfavs’]) ){ ?>

    ID; ?>’).hide();
    PPTDeleteWishlist(‘<?php echo str_replace(“http://”,””,PPT_THEME_URI); ?>/PPT/ajax/’,'<?php echo $GLOBALS[‘backupID’]; ?>’,’deletealter<?php echo $type; ?>’);”><?php echo $PPT->_e(array(‘button’,’3′)); ?>

    <?php }else{ ?>

    ID){ ?>onclick=”UpdateWishlist(<?php echo $post->ID; ?>,’add’,’AJAXRESULTS’,'<?php echo str_replace(“http://”,””,PPT_THEME_URI); ?>/PPT/ajax/’,’wishlist’);”
    <?php }else{ ?>onclick=”alert(‘<?php echo $PPT->_e(array(‘ajax’,’1′)) ?>’,’WishlistAlert’);”<?php } ?> rel=”nofollow”><?php echo $PPT->_e(array(‘fav’,’3′)) ?>

    <?php } ?>

    <?php } ?>

    <div class=”left pricetag”><?php echo premiumpress_price(get_post_meta($post->ID, “price”, true),$GLOBALS[‘premiumpress’][‘currency_symbol’],$GLOBALS[‘premiumpress’][‘currency_position’],1); ?></div>

    </div>

    </div>

    <!– end actions box –>

Viewing 13 posts - 1 through 13 (of 13 total)