I have a custom WP_Query with the following meta_query: $meta_query = array(); $meta_query['relation'] = 'AND'; if(!empty($postcode)) { $meta_query = array( 'key' => 'postcode', 'value' => $postcode, 'compare' => 'LIKE'...
I am inserting some post into wordpress using the function wp_insert_post(). I want to insert some custom fields on each post and reading the documentation I though the meta_info...
I want to have my custom field use HTML, how do I do that in such a way that I can use a rich text editor to view the...
(note: this question was originally about Custom Fields, but @MikeSchinkel had a better solution involving Custom Post Types) On my site I have several pages which I want to...
With the following code (in functions.php) my posts (of CPT event) are ordered by _end_date instead of _start_date. What’s the proper solution to this as of WP 3.1.3? Of...
Trying to improve my PHP knowledge through test and try! I am confused on [0] arguments at following WordPress PHP code global $post; $custom = get_post_custom($post->ID); $price = $custom['price'][0];...
While trying to perform a WP_Query using meta_query(), I had some trouble because the custom fields created by a plugin had _ in the beginning of its name. Although...
I have the following wp_query: $args = array( 'post_type' => 'news', 'orderby' => 'meta_key', 'order' => 'ASC', 'meta_key'=>'custom_author_name', 'post_per_page'=>-1 ); $query = new WP_Query($args); echo $query->found_posts; echo = 10...
So I’m having an issue with my custom fields in my custom post type. For whatever reason the fields save and then clear somewhat randomly… I’m sure it’s not...
I’m trying to use Custom Field types to embed Youtube videos in a more organized fashion and using the Do_Shortcode() would seem to work perfectly, however this: <?php echo...