I have found a solution for it and here is it
$current_user = wp_get_current_user();
$userID = $current_user->ID;
$args =array( 'author' => $userID,'post_type' => 'custom_post' ) ;
$authors_posts = get_posts($args);
foreach ( $authors_posts as $authors_post ) {
$content= $authors_post->post_title;
}
echo $content;
Related Posts:
- How to check if a theme is active?
- How to maintain W3C standards compliance of a theme
- Difference between a theme and a plugin?
- How can I have two different urls for the same page that load two different templates?
- All shortcodes not working on custom theme
- Disable plugins on cron and ajax page
- Is it good practice to remove redundant plugins and themes?
- Declare a function before plugin does on the theme functions.php file
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Whats the difference between Page Builder Plugins and Theme Builder Softwares? [closed]
- How to use load_plugin_textdomain from within a theme
- Theme and Plugins sharing common libraries
- Is there a quick way to inject i18n domain into theme/plugin files?
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Can I share predefined fonts from theme_support with a gutenberg component?
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- How can I list recent posts excerpts?
- Theme or Plugin: Where should I write my code?
- Plugin Deactivate Self on Activation Errors
- Do I still need a theme to use page builders?
- Two (or more) looks, with one set of content
- Can I make a super plugin that also has a theme?
- How to read individual user’s directory and display content to that specific user?
- WSOD after upgrading to 3.1
- Check for security updates
- Is there any kind of theme on WordPress to sell my own movies?
- All sites themes functions.php have been changed
- “No Add Button” for me to customize my WordPress with themes and pluggins
- How can I list all installed plugins/themes/versions from CLI/API?
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Why does my file_exist check fail?
- How to protect WordPress from security scanner [closed]
- how can I query all wordpress users of a blog
- how can I do something on new user registration?
- Making that Admin Bar transparent or a blue color
- how to activate a plugin inside a theme
- There has been a critical error on your website – won’t fix no matter what
- Is it possible not to load theme on a specific page in wordpress?
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- I receive taxonomy id
- To perform the requested action, WordPress needs to access your web > server
- why need theme,if page builder is there in wordpress [closed]
- speed up pagination for huge database
- Override css rules of a plugin within my own theme
- I want to use wordpress themes and plugin to develop website
- Is it possible for a plugin to prevent certain plugins from being installed?
- How do you create a re-useable HTML fragment in wordpress
- WP e-Commerce Gold Cart with Plugin Built Into Theme
- Per theme plugins?
- Identify current wordpress theme
- Edit all $wp_scripts at once to $in_footer = false
- In Multisite Setups, how to update mass sections of sub-sites
- Can’t load the the canges of field groups [duplicate]
- Javascript console errors and WSOD on edit post pages
- elementor development – custom widget like an inner section widget
- How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?
- Different theme menu
- Bash script to check available updates
- WordPress fresh installation did not update default plugin and themes to latest version
- How to store a custom theme and update it on other installations
- Link custom post type to page
- How to disable a widget area of a specific page?
- Showing different js file for different theme in wordpress customizer api
- Seeking specific WordPress Layout
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- Cron job emails blank
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- wp_login_form() ignoring login_form action hook
- WordPress Theme/Plugin Install (about FTP Connection)
- WordPress core update fails – no issues with plugin updates
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- How to add the functionality of WordPress needed to be installed to be mandatory while installing themes
- How to fix On “An unexpected error occurred” message when I click on Add new theme or plugin?
- How to display post by date written (1974) and not date published (today)?
- Images is not showing after migration
- Incentive theme – Getting ’You do not have sufficient permissions’ while trying to install plugins
- Child Theme Changes Are Not Reflecting In Parent Theme
- Input gets deleted/overwritten after changing to different Admin Menu
- Theme specific plugin, how?
- How do I make the selected layout display for all MarketPress pages?
- Run WP inside a other Site without using frames
- Can’t get custom user meta to show in header
- Breadcrumb is not generating the correct post page url
- Display static pages instead of category, in code
- How to make only selected posts appear on a selected wordpress page
- Theme causing SSL break on chrome
- wordpress illegal string offset ‘parameter’ error
- Install theme as part of a plugin
- Divi Template A Few Questions
- Trying to use wp_register_script/style and enqueu them from an array – getting an error [duplicate]
- Is there a way to stop the theme and especially plugins listed?
- Real estate schema markup not showing up on Rich Results test
- Issue with customizer and widget page
- Convert from Portfolio post to WooCommerce products [closed]
- WordPress menu dissapear when I add a parameter to custom post archive
- What’s the best way to update my WordPress theme to Elementor?
- Local WP site can’t locate plugins or theme
- WORDPRESS ,Can’t load image of post when sharing post via facebook [closed]
- Error 503 Service Unavailable and wp-json/tdw/save_css