You can use additional WP_Query parameters like post_per_page
For example,
$my_custom_query_args =
array( 'posts_per_page' =>1,
'orderby'=>'DESC');
$my_custom_query = new WP_Query( $my_custom_query_args );
Related Posts:
- How do I create a link that will always show the latest post?
- Getting the Next and Previous Posts Titles in the Sidebar?
- What is the difference between “post” and “page” in WordPress?
- the_post_navigation seems to ignore same category filter
- Adding Post Counts to Menu (Nav) Programmatically?
- Navigation link to specific user page
- Post Navigation
- Understand post type
- Restrict post navigation to current sub menu
- View the number of entries recorded per day
- get_next_post() and get_previous_post() return wrong posts
- Disable most recent & view all (TABS) on nav-menu.php
- Is it possible to create a form post wordpress custom navigation link?
- remove older posts link [closed]
- How to create a submenu that will navigate through different posts in the same page
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- One menu for frontpage (one pager), and a different menu for posts
- Show only one page link in content pagination
- Highlight static blog page link in header
- how to get random post id by using post type
- Show posts count for Categories and Tags in wp_nav_menu
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Restrict the_post-navigation to same category?
- Post type no single page
- Navigate through the posts using keyboard arrows
- WordPress pagination and Post Navigation not working on home page
- Get current post’s nav menu name (term name)
- Add Text Domain To Post Navigation
- How to show next/prev link, when it’s not active?
- Possible?! A contextually titled back link
- Post navigation using date
- Target only single product page
- Blog posts pagination not working
- Change URL of previous posts and next posts link in WordPress
- get_next_post() not working with future post status
- Excluding category from post navigation in WordPress?
- Creating a link to the first post in a category
- Next / Previous post in a single category
- How to add navigation arrows to manually slide through posts?
- Can the_post_navigation() be outside of the loop?
- Output wp_link_pages as raw url
- Page and Posts loading as index page? Not loading the content
- Count > 1 Navigation Slider
- How do I paginate posts page with $wpdb?
- Woocommerce – custom post type of checkout page
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- Taxonomy Category category.php not working
- How do i retrive a post from a custom post type
- How to get only post=’product’
- Show a page counter for pagination
- How can I merge a several related posts into one post?
- Get WordPress post content by post id
- Get page ID of page that is set as the posts page
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- Stop WordPress Wrapping Images In A “P” Tag
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- GET the excerpt by ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to get ‘post_content’ without stripping tags?
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?
- How to end the excerpt with a sentence rather than a word?
- How do I check if I linked to a post before I delete it?
- How to change the case of all post titles to “Title Case”
- Appending content with broken in 4.4
- How to get posts published between a date and today?
- ZIP up all images displayed in a [gallery] and offer as download link
- How to detect single.php (but not single-portfolio.php)?
- How to check if post meta key exists or not in wordpress database
- How to remove a column from the Posts page
- removing inline styles from wp-caption div
- What is the use of to_ping and pinged column?
- How to use “Add link” pop up for a WordPress widget
- Remove Categories / Tags From Admin Menu
- How to retrieve text only from wp_content() not from wp_excerpt()?
- Stop WP from creating “Sample Page” and “Hello World!” post
- Where is the old post permalink slug stored?
- How to Create Editable Blocks of Text for the Homepage?
- Keyboard shortcut for updating a page or post?
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Apply the_title() filter in post & page title, but not in menu title
- How to Change Order of Posts in Admin?
- is it possible to get next_post_link
- Get post content by ID
- How to get post creation date?