this should work for you:
if ( is_user_logged_in() ):
global $current_user;
wp_get_current_user();
$author_query = array('posts_per_page' => '-1','author' => $current_user->ID);
$author_posts = new WP_Query($author_query);
while($author_posts->have_posts()) : $author_posts->the_post();
?>
<a href="https://wordpress.stackexchange.com/questions/23829/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<?php
endwhile;
else :
echo "not logged in";
endif;
Related Posts:
- How to show related posts by category
- the_author() returns empty string
- 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
- Query only Posts from Both of Two Category?
- WordPress get posts by date without query_posts
- Can I set and show “important” post in my blog?
- Inserting custom data to the_post() during loop
- Why is querying posts messing up my pages?
- How to get posts from a current post’s month?
- While loop articles – if statement order
- Display Posts with template on a Page
- Post Filtering by GET URL parameters
- How to give classname to post if post has no content?
- Get x recent posts by author?
- Exclude a category of posts in author template
- Get posts from current category?
- How to merge the content of posts that have the same title?
- get posts, run a custom query, and join the results
- WP_Query to get posts in a specific tag or has post_format
- show latest authors blog post
- How to get all post titles starting with numbers and symbols?
- How to get single post by one author?
- Word count for all posts of all authors
- How to show related posts by detecting the current category?
- Get Posts Under Custom Taxonomy
- Keep featured content post in homepage with original order
- How to get posts published between a date and today?
- How to get post content by calling ajax?
- Get the ID of the latest post
- Hook that get’s triggered when the author of a post is changed
- get_children() Not Working with orderby Parameter
- Prevent Authors from viewing each others Posts
- How to get all posts related to particular category name?
- get all posts ID from a category
- Display Random Author with Details in Sidebar
- Display all posts from specific categories on a page
- How to show list of posts by author and category?
- WordPress: How to get the current logged in author page URL?
- get comments and get posts in loop
- How to add editor’s name to entry meta byline?
- Different permalink for posts and authors
- How to exclude latest x posts from a paginated query?
- How to know if get_posts() failed?
- Display content from a specific category
- post_name empty after wp_insert_post
- Number of posts per page setting is not working?
- Restrict the Number of Posts an Author can Publish (over time)?
- Search posts by post author name
- Get the user type of an author
- WordPress Posts Out Of Order after 3.1 Update
- Setting pagination for images attached to a post
- Find most recent authors
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- Show author post count in sidebar – Variable
- Insert custom div between posts
- Can’t show comments count per post outside loop
- Get current users post URL?
- Get the author of the latest revision
- Filter posts by author and category simultaneously
- is there a better way of combining this?
- 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
- Post author is changed to admin after his post is modified by admin
- Order post by year DESC and month ASC
- How to Display Post View Count
- Get all posts by post_author
- Different amount of posts on homepage than paged pages
- Featured Posts for Category Pages
- Quickest way to get last or oldest post date – WP Query
- How can I control multiple editing of wordpress posts?
- Multiple authors for single post without plugin
- Limit number of posts a user can make per minute?
- Cannot Update A Post, 404 Error
- Authors in menu, template list post by author
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- How only display all post related to category
- Author must complete profile info before they can publish a post?
- Function to show random posts from a category
- WP rest api returns 404 only when author param is used
- Hiding posts in a list from specified categories
- Posts are not showing up on particular category
- How can I list random authors from current post category?
- get selected post using $_GET
- How Can i Get 5 Recent Post Title With Corresponding Link?
- How would I get 1 latest post from a query for 5 posts?
- Filter Posts By Tag
- setup_postdata doesn`t seem ot be working
- Exclude posts with empty post_content in wp_query
- Encrypt / Decrypt Post Title and Details
- Get Posts via Taxonomy Term Name with Space
- Get specific posts by ID in wordpress
- Improving WP_Query for performance when random posts are ordered
- Create dropdown list post
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- How can I show wordpress posts based on author?
- Automatically republish old posts
- previewing my posts on static page?