Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

WP_Query Alphabetical Issues

$
0
0

Replies: 0

I am currently having some issues with the alphabetical orderby argument on WP_Query. It is alphabetizing the posts first and then returning 4 posts in the posts_per_page argument. My understanding was I could query the 4 latest posts and then have it alphabetical order them on output.

$args = array(
    'cat' => 89,
    'posts_per_page' => 4,
    'order' => 'ASC',
    'orderby' => 'title'
);

To reiterate my goal is to query the 4 latest posts from a category and then display them in alphabetical order.


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>