Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 847

Post meta is a data set containing additional core as well as custom post information.

1
vote
Two issues with your code in current form: wp_insert_post_data hook runs before the actual insertion happens. In other words post might not not exist yet. Data in this hook does not contain post_id. …
answered Oct 9 '12 by Rarst
2
votes
This makes no sense, required $key argument (defines which custom field value you want to retrieve) is missing: $post_meta = get_post_meta( $post->ID ); How are you actually assigning this to post? …
answered Apr 13 '11 by Rarst
0
votes
Why don't you retrieve both values and then decide which to use? As (messy) one liner it can be expressed like this: if( ( $my_link = get_post_meta($post->ID, 'my_link', true) ) || ( $my_ …
answered Jun 3 '11 by Rarst
0
votes
Don't focus on serialized aspect of it. Retrieve data using appropriate API function. Modify the data. Save data back. WordPress APIs take care of serialization transparently, no need to mess with …
answered Jan 11 '14 by Rarst
0
votes
I will make no claim this is reliable, but this is about how far I got: add_action( 'add_meta_boxes', function () { global $wp_meta_boxes; foreach ( $wp_meta_boxes['steal-from'] as $context …
answered Jun 18 '15 by Rarst
1
vote
Try this: add_filter('posts_where', 'unquote_numeric_meta_value', 10, 2); function unquote_numeric_meta_value($where, $args) { $value = isset($args->query_vars['meta_value']) ? $args->query_var …
answered Nov 8 '10 by Rarst
0
votes
The hook is save_post, not post_save.
answered Sep 13 '11 by Rarst
0
votes
This seems a little inconvenient since there are two hops from posts to terms to term meta. WP_Query cannot operate with term meta since it doesn't directly apply to posts. Without knowing more conte …
answered Aug 18 '16 by Rarst
2
votes
IDs always show in links in admin area, like /wp-admin/post.php?post=2164&action=edit There are also some plugins that simplify this, quick search came up with Simply Show IDs.
answered Sep 30 '10 by Rarst
2
votes
From quick look through related functions I don't think there is one that retrieves terms for the post and allows explicit exclusion. However there is a convenient filter the_category_list right insi …
answered Oct 17 '17 by Rarst
0
votes
At the stage of retrieving posts from database this is impossible (or at least impractical), since arrays are stored serialized by PHP in meta table and SQL won't be able to process them on the fly ef …
answered Oct 11 '14 by Rarst
66
votes
As per other answers, slug is stored in the post_name property. While it could be accessed directly, I prefer the (underused) get_post_field() function for accessing post properties which have no prop …
answered May 20 '15 by Rarst
0
votes
wp_transition_post_status() is catch–all function for status changes. You can use one of the hooks inside (transition_post_status or dynamic ones) to target specific status conditions and run code acc …
answered Dec 26 '14 by Rarst
2
votes
Well, you can't sort by field that isn't there. You can modify query conditionally only in those categories which have that field and let default query work in rest. It would be something like: if( …
answered Sep 27 '10 by Rarst
0
votes
In general WordPress posts do not represent continuous process. They and their data capture the state of certain point in time (last edit). While there is a WP Cron mechanism for scheduled and (optio …
answered Sep 5 '15 by Rarst

15 30 50 per page