Make Custom Fields Public in JSON – API
Check out this post under the “Get Posts Meta Field Is Not Available By Default” heading: https://1fix.io/blog/2015/07/20/query-vars-wp-api/
Check out this post under the “Get Posts Meta Field Is Not Available By Default” heading: https://1fix.io/blog/2015/07/20/query-vars-wp-api/
Try update_post_meta function without esc_attr <?php update_post_meta($post_id, ‘province’, $_POST[‘postProvince’], true); ?>
To retrieve a value after using add_settings_field() you should use get_option(). So you could do something like this… $value = esc_html(get_option(‘option_name’)); if ($value) { echo ‘<a href=”‘ . $value . ‘”>Click Here</a>’; } You just need to change option_name to your field name. The code will grab the value and if it isn’t false echo … Read more
This doesn’t seem especially complex, but does seem bulky and prone to errors. As I answered couple of times on similar issues – if this isn’t time critical then wait for WP 3.1 because it will have major improvements for querying by custom fields. See Advanced Metadata Queries for brief writeup on upcoming improvements. For … Read more
Have you already looked at the output of WP_Query, if you don’t submit the “meta_query” key? Do you get the posts for the event-posttype? If yes, then you could check what the “more fileds”-plugin puts in the “event-archive” custom field. Maybe you have to set the value to integer 1 or just submit a boolean … Read more
I just wrote this up so I have not tested it but this is how I would go about forcing one post to be at the end. In the first loop it excludes the posts by its ID number and in the second loop it only includes the post by the ID number, essentially you … Read more
Updated answer: Use two floated lists to emulate columns, same approach as previously though. <?php /* Template Name: PageOfPosts */ get_header(); ?> <div id=”content”> <div class=”t”> <div class=”b”> <div class=”l”> <div class=”r”> <div class=”bl”> <div class=”br”> <div class=”tl”> <div class=”tr”> <div class=”pad”> <?php while( have_posts() ) : the_post(); ?> <?php $category = get_post_meta( get_the_ID(), ‘category’, … Read more
This metabox class does exactly what you are after and so much more. wpalchemy-metaboxes
When generating the form all you need is the post id of the product pages and you can use get_post_meta function to retive the information about that product , so basically you just need to pass the product post id. eg: $price = get_post_meta($product_post_id,’price’,true);
<?php if ( get_post_meta($post->ID, ‘your_metabox_id’, true) ) : ?> <?php echo get_post_meta($post->ID, ‘your_metabox_id’, true) ?> <?php endif; ?> The trick is to use get_post_meta hook