Individual Widgets per Page
You can do it using Widget Context plugin or Widget Logic plugin. They work fine. I prefer Widget Context because it has more flexibility.
You can do it using Widget Context plugin or Widget Logic plugin. They work fine. I prefer Widget Context because it has more flexibility.
You can create groups of meta_queries using specific compare operation on them, and since you want to order based in a single custom field, you can keep the order declaration dedicated to the single meta field. So: $q = new WP_Query( array( ‘meta_key’ => ‘population’, //setting the meta_key which will be used to order ‘orderby’ … Read more
Short version: _encloseme is added to a post when it’s published. The wp-cron process should get scheduled shortly thereafter to process the post to look for enclosures. In other words, it cleans them up normally later. Nothing to worry about. Full explanation: “Enclosures” are links in a post to something like an audio or video … Read more
It looks like the nightly builds of the Advanced Custom Fields plugin can (mostly) handle this now, so you could try installing that. Details on this support issue. I can’t update my copy of it to test right now but this is what it would look like in the admin:
My first answer was completely off-mark and I’m completely rewriting it… But thanks to Milo’s hint, I found the solution here: http://wordpress.mcdspot.com/2011/05/24/search-admin-user-list-on-first-and-last-names/ After adapting it, this works for me with ‘facebook’ and ‘twitter’ author_meta. add_action(‘pre_user_query’,’wpse_27518_pre_user_query’); function wpse_27518_pre_user_query($user_search) { global $wpdb,$current_screen; if ( ‘users’ != $current_screen->id ) return; $vars = $user_search->query_vars; if(‘facebook’ == $vars[‘orderby’]) { $user_search->query_from … Read more
I’m sorry, but for now there is no easy way to “enable” revisioning of postmeta. However, you can add post metadata to revisions. A guy named John Blackburn wrote a pretty good article about adding post metadata to revisions. You find it here: https://johnblackbourn.com/post-meta-revisions-wordpress
To query posts by custom fields you can use the ‘meta_query’ parameter <?php $args = array( ‘post_type’ => ‘payment’, ‘meta_query’ => array( array( ‘key’ => ‘bookingref’, ‘value’ => ‘the_value_you_want’, ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘customerref’, ‘value’ => ‘the_value_you_want’, ‘compare’ => ‘LIKE’ ) ); query_posts($args); while (have_posts()) : the_post(); ?> you can’t use get_post_meta … Read more
This part of wp_insert_posts() gives it away: if ( ! empty( $postarr[‘meta_input’] ) ) { foreach ( $postarr[‘meta_input’] as $field => $value ) { update_post_meta( $post_ID, $field, $value ); } } where we see how the post meta fields are updated/added with update_post_meta(). Here’s the inline description for meta_input: Array of post meta values keyed … Read more
Each post meta key can have multiple values. So you get the values by default as an array; the first entry (0) is the oldest. get_post_custom() fetches all meta keys with their values. You could simplify your code with: $price = get_post_meta( $post->ID, ‘price’, TRUE ); $comake = get_post_meta( $post->ID, ‘coMake’, TRUE ); When the … Read more
Custom field names are arbitrary. The underscore hides it from the Custom Fields metabox on the post editing page. When referencing these custom fields in meta_query() or other functions, the underscore has to be used. Source: conversation with @toscho, @rarst and @wyck in the chat room.