When working with WordPress you may need to retrieve post meta values in the database that have been added by your theme or a plugin. If you are familiar with PHP this can be done using the native WordPress function get_post_meta(). However in some instances it is easier to simply use a quick shortcode which allows you to grab those values, such as when writing in the WordPress editor. Below is the shortcode that can be added to your child theme functions.php:
The shortcode contains 2 parameters, one for the meta key you are retrieving from and the other is the post ID. If you are just grabbing the meta value for the current page you don’t need to include it as it defaults to the current post ID.
The returned value is also wrapped in a <span> tab with the classes .grab-post-meta-value .id-{id} and .key-{key} (where {id} and {key} are replaced with the shortcode values.
If you aren’t sure what meta keys are saved/available with your post types then you can use a plugin like JSM’s Show Post Meta to reveal meta keys on your posts.