Articles of custom field

Amazon.com intergration with WordPress?

Wanted to know if there was any documentation or plugins that allowed a site to pull prices and other information from Amazon.com on DVD’s and other products. I’m creating a plugin that stores information about DVD releases and I would like to create code that pulls the price from Amazon, and calculates the difference compared […]

Post excerpt in custom meta box… help with proper php format

I have a custom meta box attached to a post type that displays ways for customers to submit new ideas. Customers are supposed to summarize their idea in 30 characters or less, which seems like a good use for post_excerpt. I’m not great with php (still learning) so any help with getting the echo statement […]

Adding Properties to User Profile and Displaying in List

I have a site that I am migrating to WordPress, and I have a need to add properties that each of the users can edit (e.g., Address, City, State, Business Name, etc), along with some properties that Administrators can edit (IsActive, CanEmail) that wouldn’t be displayed to the user. In addition, I need to be […]

wp custom field date format compare

How do I possible to work with this code to work with date format Y-n-j Value start_date = 2011-1-20 end_date = 2011-1-30 Here are the original function came from this Query between two meta values? function date_check_join( $join ) { global $wpdb; $join .= ” JOIN “.$wpdb->postmeta.” AS startdate ON (“.$wpdb->posts.”.ID = startdate.post_id AND startdate.meta_key […]

Insert Address fields into function

The code below gets the coordinates of an address/location using Google’s Geocoding API, It works manually typing an address where I have written “ADDRESS GOES HERE” below, doing so then outputs the coordinates appropriately. <?php function getCoordinates($address) { $address = urlencode($address); // set HTTP header $headers = array(‘Content-Type: application/json’); // Open connection $curl = curl_init(); […]

Comparing timestamps in meta query doesn't work

I want to compare two timestamps in a meta_query instead of comparing two dates in the “Y-m-d” format, each of them stored separately in custom fields, but no success. The first timestamp is an event start date/time, the second is the local date/time, also as a timestamp. When I use them in my code, posts […]

How to check if a PHP string is different than meta field?

I have a function that strips an mp3 link from the_content and saves it a custom field called audio_url and then removes the mp3 link from the the_content. What I need help with is if the the_content has a new mp3 link and the custom field needs to be updated with the new mp3 link. […]

Front end register with custom fields

Im currently working on a front end form using some code found here – orginal add_action(‘template_redirect’, ‘register_a_user’); function register_a_user(){ if(isset($_GET[‘do’]) && $_GET[‘do’] == ‘register’): $errors = array(); if(empty($_POST[‘user’]) || empty($_POST[’email’])) $errors[] = ‘provide a user and email’; if(empty($_POST[‘first_name’]) || empty($_POST[‘last_name’])) $errors[] = ‘provide name’; if(!empty($_POST[‘spam’])) $errors[] = ‘gtfo spammer’; if(!empty($_POST[‘pass1’]) && !empty($_POST[‘pass2’])) $error[] = ‘The […]

How to make a pulldown menu display custom meta terms in a theme?

I have a pulldown menu in a custom write box that classification numbers. How can I populate a select box on the front end that will: a) be populated with all the possible values defined in the functions script b) have the value chosen in wp-admin be selected on page load in the pulldown menu? […]

Copy price categories to custom field

I have just made a big mistake today using a plugin to convert my 1000+ price custom fields into child categories under Price. I didn’t know the custom fields will be deleted after the conversion. The prices are still attach to their respective posts and I’ll really appreciate it if somebody can help me with […]