Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
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 4771

Custom Fields are fields that can hold arbitrary extra information known as meta-data.

3
votes
Prefixing custom fields with an underscore only results in the keys being hidden from the default custom fields UI: There is nothing preventing plugins or theme code from otherwise querying these ke …
answered Jul 14 '12 by Milo
4
votes
Try the_content filter to append your field onto the content: function wpa_content_filter( $content ) { global $post; if( $meta = get_post_meta( $post->ID, 'reviewGrade', true ) ) { r …
answered Jun 9 '13 by Milo
0
votes
For multiple category handling you need either category__in or a tax_query, for multiple custom fields you use meta_query. The various options for both of these are covered in the WP_Query codex page. …
answered Jan 6 '15 by Milo
0
votes
move your get_post_meta call outside the query and check if it's not empty first: <?php $meta_cat_name = get_post_meta( $post->ID, 'related blog articles', true ); if( !empty( $meta_cat_name ) ): …
answered Sep 23 '11 by Milo
1
vote
Pages, Posts, and Custom Post Types are all stored in the same table with unique IDs, and in the case of meta data it works the same way for all types. In the loop you can use: echo get_post_meta( g …
answered Dec 22 '16 by Milo
1
vote
There are probably a few ways to handle this. Here's one way using a checkbox to enable the prefix for individual posts, and a filter on the_title to add the prefix whenever the_title() is called for …
answered Sep 19 '17 by Milo
3
votes
In your $args array, "meta_key" should be "event_time". If you want to get events after a certain date you also have to set meta_value to the desired date and meta_compare to >, <, etc.. Note however …
answered Jun 19 '12 by Milo
3
votes
See the ACF documentation for get_field_object: $field_object = get_field_object( 'price', $post->ID ); echo $field_object['label'];
answered Apr 1 '13 by Milo
1
vote
I'm not sure it's possible, maybe by modifying the query via pre_user_query. here's a quick and dirty function to view its contents: add_action('pre_user_query', 'my_user_query'); function my_user_qu …
answered Sep 2 '11 by Milo
2
votes
WordPress automatically serializes/unserializes the data when it's stored and retrieved, all you need to do is pass a php array as your data and you'll get the same array back when you get_post_meta. …
answered Mar 7 '13 by Milo
1
vote
You can create and position your own meta boxes via add_meta_box. You can store the data as meta data behind the scenes but it will allow you to customize the UI in the admin screens.
answered Dec 31 '12 by Milo
0
votes
It would help to see all of your code, without more context it's just shots in the dark. I use this to accomplish what you're trying to do, using date format YYYY-MM-DD and it absolutely ‘works for me …
answered Sep 7 '11 by Milo
1
vote
You can remove meta boxes with the remove_meta_box function: function wpse50430_remove_meta_boxes() { // make sure we're on an admin screen and `post` is set if( !is_admin() && !isset( $_GET …
answered Apr 28 '12 by Milo
2
votes
Add your dropdown to the post edit screen in a meta box via add_meta_box, then on the save_post action you can check and save the selected option as post meta.
answered Dec 23 '12 by Milo
0
votes
The post meta form is limited to displaying 30 keys by default. To change the value, use the postmeta_form_limit filter: add_filter( 'postmeta_form_limit', function( $limit ) { return 50; } ); …
answered Apr 6 '18 by Milo

15 30 50 per page