The post field type is used to select a post. In the options for the field you can choose what post types a user can select, for example only a specific custom post type.
Returns the id of the selected post.
If no post is selected it will return 0.
Extended Return Values
 => post
 => page
 => products
// field slug is "postExample" $post_id = simple_fields_value('postExample'); $post_title = get_the_title($post_id); $post_url = get_permalink($post_id) echo "You selected the post with id $post_id"; echo "The name of the post is $post_title"; echo "and the URL to the post is $post_url";
Output of above:
You selected post with id '2'.
The name of the post is 'Sample Page'
and the URL to the post is 'http://localhost/sample-page/'