Results 1 to 3 of 3

Thread: how to change custom fields font color in single ad

  1. #1
    Thread Starter
    tupecik's Avatar
    Join Date
    Jan 2012
    Location
    Poland
    Posts
    65
    Thanks
    9
    Thanked 2 Times in 2 Posts

    how to change custom fields font color in single ad

    Hi,
    I have small problem with font color in my single-ad site if you can check this picture:
    diabelek.png

    There is the code in single ad listing.php file I add <span class="pink"> to the code and it works (need mod in color.css file as well: div.bigright span.pink { color:#e33287; font-weight: bold;})
    php code:
    <div class="bigright"<?php if(get_option($GLOBALS['app_abbr'].'_ad_images') == 'no') echo 'style="float:none;"'; ?>>

    <ul>

    <?php
    // grab the category id for the functions below
    $cat_id = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_CAT, 'term_id' );

    // check to see if ad is legacy or not
    if ( get_post_meta( $post->ID, 'expires', true ) ) { ?>

    <li><span><?php _e('Location:', 'appthemes') ?></span> <?php echo get_post_meta( $post->ID, 'location', true ); ?></li>
    <li><span><?php _e('Phone:', 'appthemes') ?></span> <?php echo get_post_meta( $post->ID, 'phone', true ); ?></li>

    <?php if ( get_post_meta( $post->ID, 'cp_adURL', true ) ) ?>
    <li><span><?php _e('URL:','appthemes'); ?></span> <?php echo appthemes_make_clickable( get_post_meta( $post->ID, 'cp_adURL', true ) ); ?></li>

    <li><span><?php _e('Listed:', 'appthemes') ?></span> <?php the_time( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ) ?></li>
    <li><span><?php _e('Expires:', 'appthemes') ?></span> <?php echo cp_timeleft( strtotime( get_post_meta( $post->ID, 'expires', true ) ) ); ?></li>


    <?php
    } else {

    if ( get_post_meta($post->ID, 'cp_ad_sold', true) == 'yes' ) : ?>
    <li id="cp_sold"><span><?php _e('This item has been sold', 'appthemes'); ?></span></li>
    <?php endif; ?>
    <?php
    // 3.0+ display the custom fields instead (but not text areas)
    cp_get_ad_details( $post->ID, $cat_id );
    ?>
    <li><span class="pink"><?php _e('Cena za godzinę:', 'appthemes') ?></span> <?php if ( get_post_meta( $post->ID, 'price', true ) ) cp_get_price_legacy( $post->ID ); else cp_get_price( $post->ID, 'cp_price' ); ?></li>

    <li id="cp_listed"><span class="pink"><?php _e('Listed:', 'appthemes') ?></span> <?php the_time( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ) ?></li>

    <?php if ( get_post_meta($post->ID, 'cp_sys_expire_date', true) ) ?>
    <li id="cp_expires"><span><?php _e( 'Expires:', 'appthemes' ) ?></span> <?php echo cp_timeleft( strtotime( get_post_meta( $post->ID, 'cp_sys_expire_date', true) ) ); ?></li>

    <?php
    } // end legacy check
    ?>

    </ul>

    </div><!-- /bigright --><div class="bigright"<?php if(get_option($GLOBALS['app_abbr'].'_ad_images') == 'no') echo 'style="float:none;"'; ?>>

    <ul>

    <?php
    // grab the category id for the functions below
    $cat_id = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_CAT, 'term_id' );

    // check to see if ad is legacy or not
    if ( get_post_meta( $post->ID, 'expires', true ) ) { ?>

    <li><span><?php _e('Location:', 'appthemes') ?></span> <?php echo get_post_meta( $post->ID, 'location', true ); ?></li>
    <li><span><?php _e('Phone:', 'appthemes') ?></span> <?php echo get_post_meta( $post->ID, 'phone', true ); ?></li>

    <?php if ( get_post_meta( $post->ID, 'cp_adURL', true ) ) ?>
    <li><span><?php _e('URL:','appthemes'); ?></span> <?php echo appthemes_make_clickable( get_post_meta( $post->ID, 'cp_adURL', true ) ); ?></li>

    <li><span><?php _e('Listed:', 'appthemes') ?></span> <?php the_time( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ) ?></li>
    <li><span><?php _e('Expires:', 'appthemes') ?></span> <?php echo cp_timeleft( strtotime( get_post_meta( $post->ID, 'expires', true ) ) ); ?></li>


    <?php
    } else {

    if ( get_post_meta($post->ID, 'cp_ad_sold', true) == 'yes' ) : ?>
    <li id="cp_sold"><span><?php _e('This item has been sold', 'appthemes'); ?></span></li>
    <?php endif; ?>
    <?php
    // 3.0+ display the custom fields instead (but not text areas)
    cp_get_ad_details( $post->ID, $cat_id );
    ?>
    <li><span class="pink"><?php _e('Cena za godzinę:', 'appthemes') ?></span> <?php if ( get_post_meta( $post->ID, 'price', true ) ) cp_get_price_legacy( $post->ID ); else cp_get_price( $post->ID, 'cp_price' ); ?></li>

    <li id="cp_listed"><span class="pink"><?php _e('Listed:', 'appthemes') ?></span> <?php the_time( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ) ?></li>

    <?php if ( get_post_meta($post->ID, 'cp_sys_expire_date', true) ) ?>
    <li id="cp_expires"><span><?php _e( 'Expires:', 'appthemes' ) ?></span> <?php echo cp_timeleft( strtotime( get_post_meta( $post->ID, 'cp_sys_expire_date', true) ) ); ?></li>

    <?php
    } // end legacy check
    ?>

    </ul>

    </div><!-- /bigright -->
    but I can't find the code for rest custom fields to change... any ideas how to do it? I think this line display all custom fields: $cat_id = appthemes_get_custom_taxonomy( $post->ID, APP_TAX_CAT, 'term_id' ); so I can't change color

  2. #2
    bbocioaca's Avatar
    Join Date
    Jul 2012
    Location
    Buzau, Romania
    Posts
    160
    Thanks
    0
    Thanked 16 Times in 15 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    simeon's Avatar
    Join Date
    Jun 2011
    Location
    South Africa
    Posts
    129
    Thanks
    36
    Thanked 3 Times in 3 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. Classi Press Ad Categories Font & Color Change Please HELP
    By everlab08 in forum Help Using ClassiPress
    Replies: 8
    Last Post: March 31st, 2016, 06:45 AM
  2. [SOLVED] Change Font Color Of Slider Title
    By jmarshall in forum ClassiPress General Discussion
    Replies: 3
    Last Post: December 11th, 2010, 06:31 AM
  3. How to change hyperlink font color?
    By jasonyormark in forum JobRoller General Discussion
    Replies: 3
    Last Post: December 6th, 2010, 02:52 PM
  4. Change font color withing page
    By tmcguire in forum ClassiPress General Discussion
    Replies: 2
    Last Post: June 6th, 2010, 10:02 AM
  5. Change font color withing page
    By tmcguire in forum Help Using ClassiPress
    Replies: 2
    Last Post: December 31st, 1969, 06:00 PM