Please Try This To Get Post in DESC order
$args = array(
'orderby' => 'title',
'order' => 'DESC',
'author' =>'authorName',
);
$query = new WP_Query( $args );
// The Loop
if ( $query ->have_posts() ) {
echo '<ul>';
while ( $query ->have_posts() ) {
$query ->the_post();
echo '<li>' . get_the_title() . '</li>';
}
echo '</ul>';
} else {
// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
Please Check This Link
I hope this will help you.
have a good day 🙂
Related Posts:
- How to get posts published between a date and today?
- the_author() returns empty string
- Display all posts from specific categories on a page
- How to show list of posts by author and category?
- How to exclude latest x posts from a paginated query?
- Display content from a specific category
- How to display posts by current user/author in a custom page template?
- Query posts distinct authors
- Find most recent authors
- Can’t show comments count per post outside loop
- Get the author of the latest revision
- How to Display Post View Count
- How would I get 1 latest post from a query for 5 posts?
- Inserting custom data to the_post() during loop
- How To Get Posts With A Specific Word
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Display all posts that were published before full post on single.php
- Blog post per page setting conflicting with custom WP_Query?
- How to exclude latest x posts from a paginated query?
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- How to order posts in an arbitrary order?
- Display Posts on Custom Page
- Wrong post title displayed from loop
- Change all author links in Blog roll
- Get the amount of posts on a current page
- How to get posts published on the latest date?
- How to only publish posts with image in it
- WP_Query: Show 10 posts in date order, first three random
- Exclude a category of posts in author template
- Display specific posts on home page
- Display 3 posts with different HTML markup using a loop
- How to show post views shortcode data for each post on Posts List Page?
- Use special template for the first post in the loop
- List of authors posts minus very latest
- Modify WordPress loop after it has been run
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Getting posts from multiple users?
- Adding a category at even positions on main loop with modified pagination
- How to inject a post within a loop
- Why does ‘get_the_ID’ work outside of the loop?
- WordPress Post Query Using Custom native MySQL like St_Distance_Sphere
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Keep featured content post in homepage with original order
- How to show related posts by category
- How set featured posts using checkbox in post edit screen?
- Hook that get’s triggered when the author of a post is changed
- Get first post from wp_query
- Prevent Authors from viewing each others Posts
- Do we still need to include a “if (have_posts())” in templates?
- Display Random Author with Details in Sidebar
- WP_Query: Why is sticky post not first item in loop?
- Query *only* sticky posts
- rewind_posts() – what actually the use of it, and where using is required or preferred?
- Skip post in loop and mixin later
- WordPress: How to get the current logged in author page URL?
- Override the default number of posts to show for a single loop?
- get comments and get posts in loop
- How to add editor’s name to entry meta byline?
- Different permalink for posts and authors
- How do I reorder (pop and push) items from WP_Query?
- post_name empty after wp_insert_post
- Reverse chronology of post listing
- Why do I need to use The Loop on pages (inside page.php etc)?
- How to get previous 10 days post from a specific date – WP Query
- posts page – different lengths of excerpt
- Number of posts per page setting is not working?
- Restrict the Number of Posts an Author can Publish (over time)?
- WordPress Number of Posts Not Changing With posts_per_page
- Search posts by post author name
- how to display full post with pagination on home page
- Get the user type of an author
- Count singular post views automatically
- Show the title of the latest post by author
- Looping through posts per category gives same posts for each category
- WordPress Posts Out Of Order after 3.1 Update
- Query only Posts from Both of Two Category?
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Show author post count in sidebar – Variable
- Insert custom div between posts
- Display All Sticky Post Before Regular Post
- Cannot access current post’s ID in custom plugin
- Get current users post URL?
- Filter posts by author and category simultaneously
- How to have different content in the loop and single
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- Only display posts with comments
- Specific loop in Shortcode
- Strange switch_to_blog() issue
- Show a list of recently viewed posts to a user
- Multiple loops in same page, without duplicate content
- loop not displaying posts on custom template page
- Repost post on specific date every year
- How to use alternate post layout at key points in post loop?
- Post author is changed to admin after his post is modified by admin
- Alternate custom content in the loop
- Order post by year DESC and month ASC
- Showing random content / pictures from earlier posts in a sticky post?
- Search widget breaks when using multiple loops?