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
- Override the default number of posts to show for a single loop?
- Different permalink for posts and authors
- Show author post count in sidebar – Variable
- Strange switch_to_blog() issue
- Multiple loops in same page, without duplicate content
- loop not displaying posts on custom template page
- Different amount of posts on homepage than paged pages
- The correct way to call posts with ajax
- Adding specific post category between posts in loop
- How can I show many posts an author has per week?
- Multiple loops are not reset
- Pausing and Resuming WP_Query results
- How to : pagination in 3 different custom loops on the same page
- Sharing post from archive page (loop) doesn’t work
- How to make multiple sections in home pulling posts category wise?
- Query Posts by Custom Field
- Conditionals if tags exist?
- Showing categories and subcategories with posts
- Posts – display all posts except a post by an ID
- Display author’s name and avatar in post’s sidebar
- why the same code got different results when using query_posts in functions.php and index.php
- older blog posts not showing in new theme
- WordPress Query Posts From Category Post on Static Page
- Is it possible to lock all new and existing WordPress posts to one specific author?
- Loop through posts? Want to remove extra newlines in actual post HTML/content on backend
- How include css class based on post ( in loop ) slug?
- WordPress Loop: How to display recent posts in multiple divs
- Random posts that always include a particular post?
- Cannot implement byline into posts container in single.php
- Change Author Name to Sitename on Frontend
- WP_Query of Category Not Showing First Post
- How come this loop is not working? [closed]
- Using the loop to set locations for all posts on a single google map
- Change content off every sixth element
- Separate top level categories on archive-product.php by meta
- While loop in functions.php outputting the_title() of each post on frontpage
- Shortcode for Comments and Comment Boxes in Post Loop
- Show posts from two specific category in WP_Query
- Permalink Short code showing unnecessary link text inside the loop
- How to create loop of posts except post ID defined via ACF field
- What permissions does a role need for the user to be assigned as the author of a post?
- How to display particular categorie’s post which associated to specific user?
- Double loop output
- post->ID displays the same ID number for every post
- How to correctly escape data
- Posts are not showing up on next page.
- Sort Events by Venue Title – Sort Post set by related post ids
- Post are not showing up
- Get posts by category or author
- How to make post button to a random post
- Advanced Post Display/Pagination/Ordering
- Keep post format class with isotope filter
- Make assigning post to a specific category equivalent to assigning it to all categories
- How to get alphabetic listing x other posts, based on first letter post?
- Sort by category and then date?
- Loop not allowing infinite scroll after post per page limit
- Customise the appearance of 4 specific post ID’s within the loop?
- what template-part to call, to have my post in the center of the page?
- Echo author slug in post edit page
- How do I create a template page to show 3 blog posts?
- blog post displaying within older post – loop issue?