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.