Get current menu_order

WordPress implements a simple order functionality by default. What’s the common method, to retrieve the menu_order for the current post or page? 2 s 2 If you have the post with an $id: $thispost = get_post($id); $menu_order = $thispost->menu_order; WordPress itself does not provide a function to get the menu_order, so you have to query … Read more

WP_Query orderby date not working

I have a simple WP_Query to get a list of posts of co-author (taxonomy author) order by date, this is the query : $username = get_the_author_meta( ‘login’, $author_id ); $args = array( ‘post_type’ => ‘any’, ‘orderby’ => ‘date’, //’orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘author’, ‘field’ => ‘name’, ‘terms’ … Read more

WP_Query orderby post__in remains ineffective in the Loop [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 8 years ago. Improve this question I’m trying to query a custom array of posts for the homepage, trying to maintain the order given in the array. … Read more

Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?

I’m currently trying to output a list of music titles and would like to have the sorting ignore (but still display) the initial article of the title. For example if I had a list of bands it will be displayed alphabetically in WordPress like this: Black Sabbath Led Zeppelin Pink Floyd The Beatles The Kinks … Read more