Current user post data fetch in WordPress
This code for you are using for login using all posts get on your page. this code working. you can try this code.
<?php $count=1; $current_author = get_query_var('author'); $author_posts= get_posts( 'author='.get_current_user_id().'&posts_per_page=-1' ); echo "<pre>"; print_r ($author_posts); echo "</pre>"; echo $author_post['post_author']; if($author_posts){ foreach ($author_posts as $author_post) { ?> <tr> <td><?=$count?></td> <td><?=the_post_thumbnail(get_the_ID())?></td> <td><?php echo '<a href="'.get_permalink($author_post->ID).'">'.$author_post->post_title.'</a>';?></td> <td>100</td> <td>100</td> <td class="profile-view-btn"><?php echo '<a href="'.get_permalink($author_post->ID).'">'?>View<?'</a>';?></td> </tr> <?php $count++; } }?>
Author: Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.
Trending Posts
Tags
ACF
Ading custom columns
admin
Bootstrap
Cart Price
categories
Change Price
class
Code
comments
Create
Creating custom post Type
CSS
current
custom
Customizing
Custom Post
Custom Post Type
Custom Taxonomy
database
Date
Fatch
form
function
HTML
Image
Install
javascript
jQuery
Menu
PHP
Post
Post Type
Price
product
responsive
Resular price
Single product
Table
taxonomy
Theme
Title
woocommerce
Wordpress
Wordpress Code