I am surprised that you didn’t find references to the two components that you need. These are both extremely common.
$current_user = wp_get_current_user();
$query = new WP_Query(
array (
'author' => $current_user->ID,
'posts_per_page' => 1,
'post_status' => array('any'),
)
);
var_dump($query); // debug
Reference:
http://codex.wordpress.org/Function_Reference/wp_get_current_user
http://codex.wordpress.org/Class_Reference/WP_Query
Related Posts:
- Front-End Post Submission
- How to upload post thumbnail while wp_insert_post?
- Publish pending article from front end with a button?
- Get names of authors who have edited a post
- Edit a post from frontend. post_tags get saved, but not separated
- Developing a secure front end posting form
- How can I edit a post from the frontend?
- Developing a secure front end post editing form
- Post from front-end only by logged in users, form posts as “posted by:
- upload featured image from front end using wordpress add media button
- Post & edit a post from front end along with upload, dropdown, and other inputs
- Frontend Post Excerpt field mapping
- Frontend Post Form Validation
- Redirection not working in this front end post submission form?
- How to change the color theme per post?
- Adding an image to a non existing post
- How to make a bilingual front-end post using the plugin WP User Frontend and Polylang or qTranslate?
- Change Post Status From Front End
- 404 error on default post type and default taxonomy fronted page
- Lock post editing to one user at a time – wp_check_post_lock
- Front end post submission form with duplicate type fields
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- Can i have more than one form for front end posting in one template [closed]
- WordPress wp_editor to post and edit
- How to limit post (Exception pages) for current user in each role in front end?
- Create posts by any logged in users
- How to generate an HTML link automatically from URL in a users’ post
- how let users select categories for posts in frontend?
- Allow reader to reorder posts for themselves (oldest first)
- Send the post id to a front end edit post form
- Post/Edit/Delete Post From Frontend… How?
- Send/Publish a Post front end
- How Can I Limit Users to Post Creation For My Frontend Theme?
- User driven content problems
- Create post from form with image
- Stop Authors from submitting spam post
- Stop WordPress automatically adding tags to post content
- How to prevent posts from being published too close to each other?
- Let private posts stay in status “private” after edit through “editors”
- how to get a different html for odd/even posts?
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Display most recent post in category instead of archive?
- How do I programmatically add an image to a post?
- problem to delete page
- Display the latest posts, published in the last hour, with WP_Query
- same template for multiple custom post type single
- Allowing the SoundCloud player to appear in a post excerpt
- Converting multiple loops into one single loop with pagination
- Run a function when post is deleted?
- Server-side sorting of posts
- Exclude posts w/ specific post_meta on Rest API endpoint
- Add icon/badge next to posttitle of specific category
- How to change wordpress dates to native language (even if the languge not available i wordpress)
- delete_post hook – deleting multiple items
- How do I exclude the current post from listing in recent posts
- WP_Query orderby not working with meta_value_num and menu_order
- Custom Post Archive Page not working
- Wrong post title displayed from loop
- Custom post types related to same custom post type?
- Bulk delete WordPress posts with phpMyAdmin
- Disable WordPress Archive Conflict Check
- How To capitalize The First Letter Of Every Word In The Post Title
- Show post content and title in diferent divs using WP_Query using a loop
- Page and post loop same template
- Check if a custom post type has already been created
- how can i display my posts alphabetically?
- Reinstall WordPress while keeping attachments
- Get post by tag
- Display on page every post in blog WITH comments
- Custom WP_Query not working correctly
- Echo the number of posts being displayed
- Get post related to particular meta box? [closed]
- Custom Post Type, post-formats associated to custom post type > 404 archives
- Add Text Domain To Post Navigation
- Internal linking to posts permalink fail because of spaces and stripe at postname
- What would causes search to return incorrect results?
- How to implement a WordPress comments function?
- WordPress – When visiting a `single post/ single.php` my category menu item link becomes active
- How can I restore posts from ‘trash’ with their previous post_status? – WordPress
- Pagination not give another posts
- Shortcode for Comments and Comment Boxes in Post Loop
- Weird problem occurs while using WordPress REST API to create new post
- Centre Blog Index (Posts Page) on Home.php
- Dropdown Select Post Filter
- Add postmeta to all blog posts
- How to give priority to page than to posts permalink structure?
- Add category information beneath post?
- how to remove entry meta from wordpress archive category and change its display
- Save/retrieve form data best practises for theme development
- Removing standard links in the posts page
- How to handle a post before publishing?
- Changing permalink of custom category
- Error establishing a database connection
- How to limit the number of posts a user can publish based on user type
- Single post pagination
- posts_per_page – Repeats only first posts ‘post__in’ array
- Add News Feed to bespoke website, only to one page on whole site
- How to automatically convert a form with HTML link into post
- WordPress Post Updating is Not Working