Results 1 to 8 of 8

Thread: How to Pull Data from Custom Fields and Put Elsewhere

  1. #1
    Thread Starter
    Rookie
    Not a Verified Customer
    lisaz's Avatar
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Pull Data from Custom Fields and Put Elsewhere

    Using the tools inside the Classipress admin dashboard, I created some custom fields and added them to a custom form for ad listing.

    Looking at single-default.php it looks to me like this code is used to get those custom fields to appear on the ad listing page to the right of the main photo.

    Code:
          $category = get_the_category();
                    // 3.0+ display the custom fields instead
                      cp_get_ad_details($post->ID, get_cat_ID($category[0]->cat_name));
    I need some help with coding so that I can pull out individually the various custom fields and have the data appear in different places e.g., above or below the content rather than to the right of the main photo.

    From the custom fields I can see the metaname for one, for example, is cp_my_shop_url. What is the php code to retrieve that custom field data? For example, I have a "buy" button that will be below the main image and I need it to link to my_shop_url for that particular artist who listed that item. I know it will look something like this...but I need to fill in the proper php code to get it to work!

    I do not have a php coding background but do access the php files and change things and often through trial and error I can figure it out. This has me stumped, and I would really appreciate some help! Thanks.

  2. #2
    Rookie cspangler's Avatar
    Join Date
    Apr 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    Rookie
    Not a Verified Customer
    lisaz's Avatar
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    rtibbs4's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    358
    Thanks
    9
    Thanked 4 Times in 4 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    You must be an AppThemes customer and logged in to view this response. Join today!
    Last edited by pepsi; July 7th, 2010 at 03:27 AM.

  5. #5
    rtibbs4's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    358
    Thanks
    9
    Thanked 4 Times in 4 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    Member
    Not a Verified Customer
    Wamba's Avatar
    Join Date
    Apr 2010
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #7
    rtibbs4's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    358
    Thanks
    9
    Thanked 4 Times in 4 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    You must be an AppThemes customer and logged in to view this response. Join today!
    Last edited by pepsi; July 7th, 2010 at 03:28 AM.

  8. #8
    Member
    Not a Verified Customer
    Wamba's Avatar
    Join Date
    Apr 2010
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Pull Data from Custom Fields and Put Elsewhere

    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)