Page 1 of 9 123 ... LastLast
Results 1 to 10 of 84
Like Tree8Likes

Thread: Add a "sold-tag" in ad-listing and a "sold-stamp" in ad-description (cp Vers. 3.1.8)

  1. #1
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts

    Lightbulb Add a "sold-tag" in ad-listing and a "sold-stamp" in ad-description (cp Vers. 3.1.8)

    No comments about my poor english please...

    In this tutorial I show how to add a "sold-tag" in the ad-listing and a "sold-stamp" inside the ad description. Tested with Classipress 3.1.8

    Lets start with a step-by-step tutorial for those who want to do the changes by themself. Our goal is to get it like in the following pics:

    [CENTER]The Sold-Tag:
    soldtag318.jpg

    The Sold-Stamp:
    soldstamp318.jpg[/CENTER]

    We need to modify 3 php files which you can find in /wp-content/themes/classipress/ The files are:

    - loop-ad_listing.php
    - loop-featured.php
    - single-ad_listing.php

    Please first make a backup of those files! Done? OK, lets continue:

    1.)
    Open the loop-ad_listing.php and go to line 34, find this code:

    PHP Code:
    <h3><a href="<?php the_permalink(); ?>"><?php if ( mb_strlenget_the_title() ) >= 75 ) echo mb_substrget_the_title(), 075 ).'...'; else the_title(); ?></a></h3>
    Replace above code with this code:

    PHP Code:
    <h3><a href="<?php the_permalink(); ?>"><?php if ( mb_strlenget_the_title() ) >= 75 ) echo mb_substrget_the_title(), 075 ).'...'; else the_title(); ?></a>
    <span><?php if (get_post_meta($post->ID'cp_ad_sold'true) == 'yes') : ?>
    <img src="/wp-content/themes/classipress/images/sold_tag.png"></span>
    <?php endif; ?></h3>

    save the file.
    __________________________________________________ ________________________

    2.)
    Open the loop-featured.php and go to line 38, find this code:

    PHP Code:
    <h3><a href="<?php the_permalink(); ?>"><?php if ( mb_strlen(get_the_title()) >= 75 ) echo mb_substrget_the_title(), 075 ).'...'; else the_title(); ?></a></h3>
    Replace above code with this code:

    PHP Code:
    <h3><a href="<?php the_permalink(); ?>"><?php if ( mb_strlen(get_the_title()) >= 75 ) echo mb_substrget_the_title(), 075 ).'...'; else the_title(); ?></a>
    <span><?php if (get_post_meta($post->ID'cp_ad_sold'true) == 'yes') : ?>
    <img src="/wp-content/themes/classipress/images/sold_tag.png"></span>
    <?php endif; ?></h3>

    save the file.

    __________________________________________________ ___________________

    3.)
    Open the single-ad_listing.php and go to line 88, find this code:

    PHP Code:
    <li id="cp_sold"><span><?php _e('This item has been sold''appthemes'); ?></span></li>
    Replace above code with this code:

    PHP Code:
    <li id="cp_sold"><span><img src="/wp-content/themes/classipress/images/stamp-sold.gif"></span></li

    save the file.

    __________________________________________________ _____________________

    4.)
    Copy (or create your own) the following images and upload them to:

    /wp-content/themes/classipress/images/

    sold_tag.png

    stamp-sold.gif

    __________________________________________________ ______________________

    5.)
    Enjoy and drink a beer


    If someone does not like to do the changes by himself, ask me here and i give you the ready changed files which you only have to upload to your folder.

    Thanks for reading and best regards

    Samcy

  2. The Following 32 Users Say Thank You to samcy For This Useful Post:

    Adriano (April 1st, 2012), aedwin (June 9th, 2012), agengo (January 21st, 2013), cactusweb (March 30th, 2012), cozmuler (May 28th, 2014), cswigert1 (July 12th, 2012), dbatista (March 30th, 2012), dunnbiz (April 11th, 2012), eaport (April 22nd, 2012), evolutionsic (March 20th, 2013), f1ngers (May 22nd, 2012), ggriffin (April 1st, 2012), heldersantana (August 10th, 2012), hunterdan111 (May 4th, 2012), ignacio (December 14th, 2012), inspired (January 2nd, 2013), josh_red (October 1st, 2012), kdubose (May 31st, 2012), kurtcharlesjr (June 9th, 2013), martynmillsba (June 27th, 2013), matt (April 11th, 2012), mvital (June 8th, 2013), myTownlist (July 29th, 2012), portopartner (October 25th, 2014), profitsh (February 1st, 2013), rafaellfontana (November 29th, 2012), rolan (July 21st, 2012), siewtak (July 27th, 2013), steph222 (July 5th, 2012), tyrone (June 18th, 2012), valance (October 22nd, 2012), yopopi (July 27th, 2012)

  3. #2
    Rookie titan's Avatar
    Join Date
    Mar 2012
    Location
    Belgium
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #3
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. The Following User Says Thank You to samcy For This Useful Post:

    slavia (September 3rd, 2013)

  6. #4
    Member mossj88's Avatar
    Join Date
    Feb 2012
    Location
    England
    Posts
    60
    Thanks
    3
    Thanked 9 Times in 7 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #5
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. The Following User Says Thank You to samcy For This Useful Post:

    Adriano (March 31st, 2012)

  9. #6
    Member mossj88's Avatar
    Join Date
    Feb 2012
    Location
    England
    Posts
    60
    Thanks
    3
    Thanked 9 Times in 7 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #7
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  11. The Following User Says Thank You to samcy For This Useful Post:

    ecua (March 31st, 2012)

  12. #8
    Senior Member ecua's Avatar
    Join Date
    Jan 2012
    Location
    Ecuador - Nederland
    Posts
    113
    Thanks
    8
    Thanked 14 Times in 12 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  13. #9
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  14. #10
    Senior Member ecua's Avatar
    Join Date
    Jan 2012
    Location
    Ecuador - Nederland
    Posts
    113
    Thanks
    8
    Thanked 14 Times in 12 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 9 123 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [TUTORIAL] Add a "Sold Tag" to the Ad listing
    By dmyers in forum ClassiPress General Discussion
    Replies: 131
    Last Post: April 23rd, 2013, 03:48 AM
  2. [TUTORIAL] Creating a "SOLD" stamp for your ads.
    By dmyers in forum ClassiPress General Discussion
    Replies: 63
    Last Post: March 3rd, 2013, 07:40 AM
  3. Mark as Sold not showing "Sold" tag on ads
    By ramystyle in forum Report ClassiPress Bugs
    Replies: 5
    Last Post: September 21st, 2011, 02:17 PM
  4. If user makes sold ad "un-sold", the status is still sold
    By teddyjohan in forum Report ClassiPress Bugs
    Replies: 12
    Last Post: June 7th, 2011, 03:48 PM
  5. Changing "Sold" to "Expired"
    By sonja0966 in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: April 20th, 2011, 01:25 PM