The follow source is more formatted, but in the goal the same like your tests. You should see, the first line to get the ID is not necessary. You have the ID of the user, there is present.
If the loop get posts, it print a title and the date. Important is, that the post type exist and have posts.
<?php
$args = array(
'author' => wp_get_current_user()->ID,
'post_type' => 'CUSTOM_POST_TYPE',
'numberposts' => -1,
);
$cquery4 = new WP_Query( $args );
if ( $cquery4->have_posts() ) :
while( $cquery4->have_posts() ) :
$cquery4->the_post();
the_title();
the_date();
endwhile;
wp_reset_postdata();
endif;
Related Posts:
- show user based on user_meta
- Get posts by meta value
- post formats – how to switch meta boxes when changing format?
- How get post id from meta value
- Safe to delete blank postmeta?
- advanced custom fields update_field for field type: Taxonomy
- update_post_meta not saving when value is zero
- Restrict post edit/delete based on user ID and custom field
- Remove post meta keys
- How to access the post meta of a post that has just been published?
- delete unused postmeta
- Should I sanitize custom post meta if it is going to be escaped later?
- List posts under meta_value heading
- Using Advanced Custom Field (ACF) to insert meta description on each page
- How to add meta tag to wordpress posts filter?
- Correct processing of `$_POST`, following WordPress Coding Standards
- Metabox Data not being saved [closed]
- Options to get my custom post type metadata via the WordPress API
- Generate an Email address from that of the Post Author
- How to get the total number of meta_values based on a custom post type?
- Saving html into postmeta without stripping tags – safe?
- Does “update_post_meta” check if value is the same before updating?
- Add a meta value if admin , editor or any other user have open a post in edit mode
- Finding the page id
- WP_POSTMETA – What do these values mean inside the data structure?
- Update Line Item Meta Data – WooCommerce API
- “update_post_meta” not working in “wp_insert_post_data” hook
- Unset field from an array not working as expected
- Update post_meta with WooCommere variation data
- What is proper way to store info such as user marking a post as favorite? In post meta or user meta?
- What type of index should I use for postmeta?
- How to create a meta_query to get all posts with a specific meta data?
- hide posts with specific meta data from admin page
- Meta function issue
- Get a row from a separate table by matching a posts meta_key to a tables ID column
- get_post_meta is showing file url in url bar
- get_post_meta not extracting title,permalink and posttype
- Save post meta foreach loop
- Should I save this mulit dementional arary as one post meta?
- How to check if a post meta key/value pair already exists for a specific post
- Reset/delete post views meta/custom field after X hours or minutes or seconds
- Sort Posts By Custom Field Date?
- Difficultly changing date format in post meta value
- Remove last character in get_post_meta
- mass delete posts based on metadata
- Have lots of meta for posts, is it better to get at all at once or each individually
- Query posts WITHOUT a custom meta field
- How to obtain a group of post meta and assign each meta to other variables?
- Add box with custom per-page properties
- get_post_meta not working when variable used for post ID
- Update post meta dynamically
- Duplicate rows in meta table, any known relations in WC?
- update_post_meta in loop changing ALL values
- Is it safe to add a new field to meta_value field?
- Need a SQL query to update meta_key=’_price’ with value in meta_key=’_regular_price’
- Why is my get_post_meta not properly calling the custom field when attempting to embed a YouTube video?
- Show number of posts by logged in user
- How to echo value of a meta select box to the browser
- How can I use ‘orderby’ => ‘meta_value_num’ to order by the numerical value even if the value starts with a word?
- New Table vs Post / Comment Meta
- How we can get “get_post_meta” of specific user who added it
- help to decipher wp metadata
- How do I add a fixed value to get_post_meta();?
- Add post’s category as a meta tag to the post
- How can I query for posts using a date stored in post-meta?
- I can not display meta value in extras.php and template-tags.php
- update_post_meta() updating nested array in Multidimensional array with empty sub-array
- get specific values from WordPress meta_value
- Is duplicate `_wp_attachment_image_alt` meta key allowed?
- Sorting my posts on homepage my specific value in post_meta table
- How can i set media attachments to the author of the post or page for already existed posts with attachments
- Strict comparisons problem when using boolean post meta
- How to get posts by meta value as multi-dimensional array?
- Add post meta data date to event
- Check if any meta on the post has value then display content
- How to modify default meta link format
- Combine meta query and give a specific meta query a higher priority
- Something adding an excessive meta description
- Move Entry Meta Above Title in Archives (Genesis + Brunch Pro)
- how to query posts using value in meta post array
- Why doesn’t wp_oembed_get() for the video post format not work?
- Custom Meta Fields that are Echo’d are removed on post update?
- How to add dynamic content in title and meta description in wordpress theme for homepage, post page, category, tag and pages
- How to call get_post()?
- add_post_meta only adding 1 character
- Create a Gallery and update Post Parent of Attachment Images
- Update event post meta each day automaticaly
- Advanced Custom Field — grabbing post_meta from previous post
- How to order posts by the user_login that corresponds to a meta_value (which is a user id)?
- Posts with no meta field do not appear when sorting by meta field
- How do I delete element from a serialized array upon deletion of a post?
- How to create a link for wordpress meta datas?
- Fetch post meta data on POST request
- Get meta information from post parent
- Counting number of identical meta keys
- wp_postmeta store multiple values in one key [closed]
- query with custom field
- Using Form to alter PHP variable [closed]
- Chance post id into post name
- get_post_meta() returns nothing in save_post, publish_post, wp_after_insert_post