Results 1 to 9 of 9

Thread: Sold ribbon using hooks in child theme

  1. #1
    Thread Starter
    Junior Member plink's Avatar
    Join Date
    May 2011
    Location
    Australia
    Posts
    37
    Thanks
    2
    Thanked 1 Time in 1 Post

    Sold ribbon using hooks in child theme

    Hi members,

    I am so close but yet so far implementing a sold ribbon using appthemes action hooks and child theme. So far I have
    PHP Code:
    //Add sold ribbon to listings
    function sold_ribbon() {
    if (
    get_post_meta($post->ID'cp_ad_sold'true) == 'yes') echo '<span class="featured-ribbon-red"></span>'; else echo '';
    }
    add_action('appthemes_before_post_title','sold_ribbon'); 
    and my css
    HTML Code:
    /* First set parent divs to position relative */
    .shadowblock,
    .post-block {
        position: relative;
        }
    
    /* Then style and position your ribbon on listings pages */
    .sold-ribbon-red {
        height: 60px;
        width: 60px;
        position: absolute;
        top: -4px;
        left: -4px;
        z-index: 99px;
        background: url(./images/sold_60.png) no-repeat;
        }
    
    /* Now style and position on single ad pages */
    div.shadowblock div.sold-ribbon-red {
        top: 69px;
        left: 12px;
        }
    I have a feeling the problem is in the php, I don't get any errors appearing, but the ribbon won't appear. Any help would be greatly appreciated.

  2. #2
    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!
    Rolf Hassel (Samcy)

  3. #3
    Thread Starter
    Junior Member plink's Avatar
    Join Date
    May 2011
    Location
    Australia
    Posts
    37
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    Junior Member plink's Avatar
    Join Date
    May 2011
    Location
    Australia
    Posts
    37
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    Rookie jackden's Avatar
    Join Date
    May 2012
    Location
    Canada
    Posts
    9
    Thanks
    0
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    Rookie jackden's Avatar
    Join Date
    May 2012
    Location
    Canada
    Posts
    9
    Thanks
    0
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. The Following User Says Thank You to jackden For This Useful Post:

    cjk123 (May 18th, 2012)

  8. #7
    Rookie jackden's Avatar
    Join Date
    May 2012
    Location
    Canada
    Posts
    9
    Thanks
    0
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. The Following User Says Thank You to jackden For This Useful Post:

    plink (May 18th, 2012)

  10. #8
    Thread Starter
    Junior Member plink's Avatar
    Join Date
    May 2011
    Location
    Australia
    Posts
    37
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  11. #9
    Senior Member cjk123's Avatar
    Join Date
    Apr 2012
    Location
    United States
    Posts
    105
    Thanks
    3
    Thanked 23 Times in 13 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. Replies: 11
    Last Post: February 2nd, 2013, 11:35 AM
  2. Related Ads using hooks (functions.php) in child theme
    By plink in forum ClassiPress General Discussion
    Replies: 4
    Last Post: May 5th, 2012, 02:22 AM
  3. [SOLVED] Hooks and Child Theme in Wordpress 3.3.1 and Classipress 3.1.6/3.1.7
    By laura in forum Report ClassiPress Bugs
    Replies: 12
    Last Post: January 30th, 2012, 04:30 PM
  4. Creating child theme, Modifying classipress theme
    By kajaja in forum ClassiPress General Discussion
    Replies: 2
    Last Post: September 29th, 2011, 12:28 PM
  5. Child Theme - logout redirection to default theme issue
    By cgervereau in forum ClassiPress General Discussion
    Replies: 3
    Last Post: September 1st, 2010, 02:48 AM