Post metas are used for storing custom data that you want to store and retrieve yourself. The default post data post type
, title
, permalink
are not saved in post meta. You can retrieve post_type
and title
using get_post() function which returns a WP_Post object. For permalink you need to use get_permalink() function like this.
$post = get_post($post_id);
$title = $post->post_title;
$posttype = $post->post_type;
$permalink = get_permalink($post_id);