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 user 736

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

1
vote
Alternatively, instead of updating your metafield, add a new one! Then the problem becomes, which meta has the highest value, and how do I cleanup the other meta fields. How I Would Do It Instead o …
answered Nov 21 '12 by Tom J Nowell
0
votes
This is doable, the meta data itself has no heriarchy, they're simple key value pairs attached to a Post ID, nothing more. You would be ebtter implementing these yourself via metaboxes, rather than re …
answered Mar 30 '12 by Tom J Nowell
1
vote
Firstly, it isn't an error, it's a warning: Warning: Invalid argument supplied for foreach() It's showing as an error because your PHP is configured that way. Research error logging levels for m …
answered Jul 20 '14 by Tom J Nowell
0
votes
WP_Query is your friend. Combined with featured images, you should be able to do this as a page template with a WP_Query call and loop. This is the html for the top post at the moment: <li class=""> …
answered Jan 16 '13 by Tom J Nowell
1
vote
You can include any template you want using get_template_part() e.g.: <?php get_template_part('navigation'); ?> Using this function also gives you child/parent theme support. Also of note, you co …
answered Apr 16 '12 by Tom J Nowell
1
vote
Yes! Yes you can! You can use this code to retrieve a stored option: $value = get_post_meta($post->ID,'customfieldname',true); // where true means only return 1 custom field by this name You can u …
answered Oct 31 '11 by Tom J Nowell
4
votes
The problem here is that post meta wasn't designed for these kinds of searches, that's why the taxonomy tables exist, else categories and tags would be stored as post meta Post meta is optimised for …
answered Aug 9 '17 by Tom J Nowell
1
vote
You have gaps in your knowledge of how data is structured in WordPress. In WordPress all pages/posts etc are 'posts' and have a type. For example: 'post' posts are blogposts 'attachment' posts are …
answered May 7 '14 by Tom J Nowell
0
votes
Inside your post loop, use $post->ID instead of $wp_query->post->ID. If you could post the loop you're using it would be clearer.
answered Nov 19 '11 by Tom J Nowell
1
vote
$value = get_post_meta($post->post_parent,'your fields name',true); if(!empty($value)){ // display the value echo $value; }
answered Apr 15 '12 by Tom J Nowell
0
votes
Instead of directly grabbing the meta, wrap it in a function, then you can provide a default, or, comment out the innards and just return "this"
answered Oct 4 '12 by Tom J Nowell
1
vote
Custom fields are also known as post meta. Many things are stored as post meta, such as the ID of the featured image. You'll have noticed that these do not show up in the custom fields section of your …
answered Jan 12 '15 by Tom J Nowell
0
votes
So you got a lot of stuff right, and some things wrong, so I'll go through it line by line First: wp_reset_query(); This function cleans up after a query_posts call, you should never use eithe …
answered Oct 15 '18 by Tom J Nowell
1
vote
Given the post types person and location, this will print out the latitude and office of every person: $q = new WP_query(array( 'post_type'=> 'person')); if($q->have_posts()){ while($q->have_post …
answered Feb 3 '12 by Tom J Nowell
1
vote
The simplest method, albeit not the cleanest: $args = array( 'post_type' => 'gallery', 'posts_per_page' => -1, 'meta_key' => 'gal-ID', 'order_by' => 'meta_value', 'order' => 'ASC' …
answered Dec 24 '11 by Tom J Nowell

15 30 50 per page