$args = array( 'author' => 1, 'numberposts' => 1 );
The author parameter isn’t documented on the get_posts()
codex page, but it does work.
Related Posts:
- How to know if get_posts() failed?
- How to display posts by current user/author in a custom page template?
- Query posts distinct authors
- How to get previous 10 days post from a specific date – WP Query
- Show the title of the latest post by author
- How can I show many posts an author has per week?
- Why posts array is empty?
- How to give classname to post if post has no content?
- Related Posts function not working
- Get x recent posts by author?
- Get latest author posts inside the loop
- How to show multiple posts thumbnail, title and date in widget
- how to show comments only author which send own posts in wordpress
- Fill the exclude array() in get_posts()
- Retrieve latest post by multiple categories with ID
- posts_per_page – Repeats only first posts ‘post__in’ array
- Should we trust the post globals?
- Get first post from wp_query
- Prevent Authors from viewing each others Posts
- Querying post from a multisite network
- How to query serialized array by comparing greater than (>=)?
- Show related posts by category but ignore one category
- post__in for get_posts with a dynamic array
- Restrict the Number of Posts an Author can Publish (over time)?
- Post content being duplicated by the_content();
- 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?
- How to add padding between posts
- Working Bootstrap Carousel Conversion to WP – Technical Questions
- How to change bulk post status
- Add few specific post ids to wp_query
- Multiple authors for single post without plugin
- Author must complete profile info before they can publish a post?
- How Can i Get 5 Recent Post Title With Corresponding Link?
- WP_Query posts_per_page ignored
- Can I set and show “important” post in my blog?
- wp_query ‘s’ parameter does not work with custom post type
- WP Query – duplicated posts once including tags in search results
- How can I show wordpress posts based on author?
- Query Posts multiple conditions
- how to get posts ids inside pre_get_posts filter?
- Future post ID not showing
- How do I restart my loop with get_next_post()?
- How do I use WP_Query to get a range of posts with custom fields that have numbers with letters in them?
- How to give capability (publish contributors posts) to author role?
- recent posts for different categories
- Change post order random through out the entire WordPress
- Setup a custom dynamic post
- Anyway to grab author name and featured image in an embeded in inital array of posts outside of loop?
- Removing noindex posts from wp_query
- Exclude the first ‘n’ number of posts of a tag from home page?
- wp_posts table: safely remove unused columns to save database storage
- Using wp_list_pages() after calling query_posts()
- how to get post order by post id wp_query?
- How to Get Posts, Including Private Ones?
- How to display all posts divided/ordered by post date? [closed]
- (solved) getting post author’s user role
- Why are my paginated posts always returning the same results?
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- Query posts by Author and/or by Tag
- If contributor has published 2 or more posts then show otherwise hide
- Migrate posts from category and sub-category via SQL
- Exclude some posts from displaying in wp_query based on some condition
- Custom Articles page only showing a limited number of posts per page
- Restrict displaying posts to the poster itself (in Back-end)
- How to get post with slug and exclude categories
- How can I set a maximum allowed post size and number of posts submitted?
- Author Avatar as default first image
- Sidebar limiting to 10 posts?
- Prevent 404 of Author pages without posts
- WP_Query get posts in custom database table [duplicate]
- WP query taxonomy optimization
- get posts, run a custom query, and join the results
- Change Old WordPress Post Date Year
- Author post count in category
- Displaying all posts from other sites on the network on one site
- Multisite how to display merged posts from two sites and sort by latest date?
- Query prints posts without specific categories
- Display post by Random Authors on Page Refresh
- Using a meta_value or postdate to to query and orderby
- Exclude posts in home slider from sections
- Ajaxify Post Sort
- How to add navigation arrows to manually slide through posts?
- Get current user, change users post status to published
- Display WordPress Post By Date
- GUID to related post not in current language
- How can I display a specific number of post in a category via a url
- Advanced Post Display/Pagination/Ordering
- Make assigning post to a specific category equivalent to assigning it to all categories
- How do I paginate posts page with $wpdb?
- WP_Query retrieve custom posts but not the post showing
- Bulk Attach Or Insert Media To Post Without Opening Post Editor
- WP_Query based on a custom field result
- Displaying posts on Homepage
- Exclude sub sub categories from displaying in the archive page
- How do I show the post title if an advanced custom field hasn’t been used?
- How add class the_content();?
- append $_GET parameters to post
- How do I get content of custom post type through post ID
- Filters do not work when there are multiple (one works)