I am able to display posts ordered by custom meta key using the pre_get_posts action. How ever, it is leaving out (not displaying) posts without this meta key. Is there any way to display the posts with out the meta key at the end?  $q-&gt;set( 'meta_key', '_1m_e_date' ); $q-&gt;set( 'orderby', 'meta_value' ); $q-&gt;set( 'order', 'ASC' );    Thank you
123241
I'm working on a custom taxonomy term page template where we want the items that are connected to the term sorted by a publication date (custom date field) - and if there are multiple items on the same day (formatted like YYYY-MM-DD) to then sort those by title, and finally sort by title if the custom field has not been filled out (older items).  So, I tried it hundred different ways with a WP_query and it does return most of the results as I want them - but in this case it's only returning the items that have the meta_key of publication_date. All other items are being ignored and not displayed. I tried a meta_query using a relation of "or" and compared the publication_date as EXISTS and NOT EXISTS, but that returned 0 results for me.  Also, the site is running 3.5.2 still and they do not want to upgrade.  Here is my most recent query that gets me the posts that have the publication_date custom field displayed in the correct order:  $term = get_queried_object(); // find the term of the taxonomy page we are on $wp_query = new WP_Query( array( 'post_type' =&gt; 'resource', 'tax_query' =&gt; array(     array(         'taxonomy' =&gt; 'resource_types',         'field' =&gt; 'slug',         'terms' =&gt; $term-&gt;name,     )),   'meta_key' =&gt; 'publication_date', 'orderby' =&gt; 'meta_value_num', 'order' =&gt; 'DESC', 'paged' =&gt; $paged, 'posts_per_page' =&gt; '10', ));   I also tried using wpdb and running a SQL query, but I really am not sure how to accomplish what I want doing that. If someone could help me out that would be awesome!  Thanks in advance.
102286
I've just noticed on the review queue for all sites that Meta Reviews appears as below. On Super User to use a specific example I noticed there are outstanding review items on meta but on the main site the review queue is listed as below. Are there any plans to update it to show outstanding items awaiting review or is it simply a reminder for reviewers to pay attention to meta reviews from time to time?
79471
Inspired  and at the risk of being downvoted to oblivion, I'd like to propose a feature request.  Can we automatically explain to people what downvotes mean on Meta?  I am getting tired of seeing people on Meta ask about why they were downvoted with no comment, whine and complain and boo hoo hoo. Votes on meta are different!  I understand, I was new to Meta once too...  Can we somehow show   automatically when someone tries to ask why they were downvoted on Meta?  Here's some freehand circles to help you guys know how serious I am:    (Yes I am pretty well aware this will just be another  question)
37578
Interesting challenge. I was given a piece of code earlier, which I have modified as follows for the Posts page.  /* add time stamp */ add_filter('manage_posts_columns', 'posts_columns', 5); function posts_columns($defaults){     $defaults['your_date_col'] = __('Date');     $defaults['week_number'] = __('Wk#');     $defaults['week_in_quarter'] = __('Wk/Qtr');     return $defaults; } add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2); function posts_custom_columns($column_name, $id){     if($column_name === 'your_date_col'){     echo the_date('d M'),' ',the_time('Ha');     }     if($column_name === 'week_number'){     echo 'Here: ',the_date();     } }   Strangely, although the date format that I have given shows up in the first column ("your_date_col"), only "Here: " shows up in the second column ("week_number"). Any suggestions as to why the_date function doesn't work in the second column?
66634
I there any way for changing the order of custom post type name in permalink From /{custom-post-type}/{post-name} To /{post-name}/{custom-post-type} Is this possible?
120775
I have the following code and while get_the_ID() works, $post->ID does not, why?      $the_query = new WP_Query( array(         'post_type' =&gt; 'custompost',     ) );      while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post();         echo $post-&gt;ID;     endwhile;
115594
Is there a way to filter posts by featured image when initialising a WP_Query object?  Example  $my_query = WP_Query(array("has_thumbnail"=&gt;true));   or, more ideally  $my_query = WP_Query(array("has_thumbnail_size"=&gt;"custom_size"));
96983
I have extended class WP_List_Table to create a custom sortable table of posts along with a quick edit box with custom meta boxes.  The meta boxes populate and save but when I click submit the field values disappear and the defaults ( cb, title, tags, cats, etc) which are not even included in my class get added back to the column saved. This throws off the other columns on the page.  The saved custom field values return when the page is refreshed.  It seams like on submit the $post_object is missing.  I'm using a hacked get_inline_data function that includes the meta_values in my quick edit form instead of calling get_inline_data in my class.  My save function for the meta boxes:  add_action( 'save_post', 'save_inline_edit_meta' ); function save_inline_edit_meta( $post_id  ) {     global $pagenow;      if ( $pagenow == 'admin.php' ) {      if ( isset( $_POST[ 'is_quickedit' ] )  &amp;&amp; isset( $_POST[ 'standinghead' ] ) )         update_post_meta( $post_id, '_wnd_standing_head', $_POST[ 'standinghead' ] );      if ( isset( $_POST[ 'is_quickedit' ] )  &amp;&amp; isset( $_POST[ 'headline' ] ) )         update_post_meta( $post_id, '_wnd_alt_title', $_POST[ 'headline' ] );      if ( isset( $_POST[ 'is_quickedit' ] )  &amp;&amp; isset( $_POST[ 'deck' ] ) )         update_post_meta( $post_id, '_wnd_deck', $_POST[ 'deck' ] );     }   return $post_id;  }   My Javascript save function:  save : function(id) {         var params, fields, page = $('.post_status_page').val() || '';          if ( typeof(id) == 'object' )             id = this.getId(id);         $('table.widefat .inline-edit-save .waiting').show();         params = {             action: 'inline-save',             post_ID: id,             post_type: 'post',             edit_date: 'true',             post_status: page         };         fields = $('#edit-'+id+' :input').serialize();         params = fields + '&amp;' + $.param(params);          $.post('admin-ajax.php', params,             function(r) {                 $('table.widefat .inline-edit-save .waiting').hide();                  if (r) {                     if ( -1 != r.indexOf('&lt;tr') ) {                         $(inlineEditPost.what+id).remove();                         $('#edit-'+id).before(r).remove();                         $(inlineEditPost.what+id).hide().fadeIn();                     } else {                         r = r.replace( /&lt;.[^&lt;&gt;]*?&gt;/g, '' );                         $('#edit-'+id+' .inline-edit-save .error').html(r).show();                     }                 } else {                     $('#edit-'+id+' .inline-edit-save .error').html(inlineEditL10n.error).show();                 }             }         , 'html');         return false;     },
35476
The  has the wording:     10 posts with score of 2 on meta.   Does this mean that to get the badge I need 10 posts with a score of exactly 2 at the same time?  Should the wording be changed to something like:     10 posts with score of 2 or more on meta.
2495
My question is simple, I'm using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query.  Now my problem is I would like to orderby the taxonomy, but from documentation and searching on the web I can't find a solution.  The orderby in WP_Query lets you order by a bunch of fields even custom meta fields but it doesn't seem to support taxonomy.  Any pointers in the right direction?  Thank you all.
23934
I have a custom field called "value_date" where add a date  e.g yyyy/mm/dd  The idea is sort the upcoming dates first in the loop, is possible?  I used a template for custom post taxonomy-event-date.php and this is code in the function, It doesn't work.  Functions.php  add_action('pre_get_posts','search_filter'); function search_filter($query){     if ( !is_admin() &amp;&amp; $query-&gt; is_tax( 'event', 'date' ) ) {         $today = date( 'Y-m-d' );         $query-&gt;set('post_status', 'publish');         $query-&gt;set('meta_value', $today);         $query-&gt;set('meta_key', 'value_date');         $query-&gt;set('orderby', 'meta_value_num');         $query-&gt;set('order', 'ASC');     } }
51267
I was answering  question and was trying to post following url in comments but everytime it failed -    I searched on Meta and came across  post and tried the solution posted but url is already encoded and doesn't work.   Is there a way to make this work in comments?
90418
Is there a hook I can use that when a post is created or updated it goes back to the list/table page of all the posts. If it is also possible to target a post type as well that would be cracking.  It's a really silly request I know and have argued the toss about it but wanted to make sure it was achievable if not very user friendly.  Steve
97598
I can select posts via my custom taxonomy as explained . But I am not sure, how I have to set up the tax_query if I want to get only posts which have no relation in the custom taxonomy at all. Any suggestion?
36984
Trying to solve  I tried to find the complete list of all available/possible default "post meta" tags/entries. I couldn't find this info documented anywhere. Any pointers?
78286
I got a loop from internet (I forgot the site) for two column post view. It has a nice CSS for it too. But skipping that for the question now.  &lt;?php $counter = 1; ?&gt;                  &lt;?php query_posts( 'cat=3&amp;showposts=6' ); //Find whether the catID is 3 ?&gt;             &lt;?php while ( have_posts() ) : the_post() ?&gt;                   &lt;?php /* Two Column Support get class */ ?&gt;              &lt;?php $class = ( $counter % 2  ? ' one' : '' ) ?&gt;                  &lt;?php /* Two Column output open the div class */ ?&gt;              &lt;div class="column&lt;?php echo $class;// echo $first; ?&gt;"&gt;              &lt;?php news_format(); ?&gt;             &lt;/div&gt; &lt;!-- End Two Column Support close div class --&gt; &lt;?php $counter++; //Update counter ?&gt;   It printed my posts into 2 columns like:  ========= | 1 | 2 | --------- | 3 | 4 | --------- | 5 | 6 | =========  It's fine. But I want to print it like this:  ========= |   1   | --------- | 2 | 3 | --------- | 4 | 5 | --------- | 6 | 7 | =========  What the modification I need to do? I can't pass any custom limit into the WordPress' custom loop &lt;?php while ( have_posts() ) : the_post() ?&gt;. It's for a custom theme. I did it, but the problem is, it's showing like:  ========= |   1   | --------- | 1 | 2 | --------- | 3 | 4 | --------- | 5 | 6 | =========   is my whole bunch of code.
120525
I have created a custom post type and have attached some custom fields to it. Now I would like to the search that authors can perform on the custom post list screen (in the admin backend) to also be performed on the meta fields and not only look in the title and content as usual.  Where can I hook in and what code I have to use?  Example image   Stefano