1. Create the Custom Meta
![](http://www.themepunch.com/wp-content/uploads/2018/07/add-new-meta-data.jpg)
![](http://www.themepunch.com/wp-content/uploads/2018/07/add-meta.jpg)
2. Add some content to the new Custom Meta field
![](http://www.themepunch.com/wp-content/uploads/2018/07/add-meta-value.jpg)
3. Add the following shortcode to the page, and modify the “eg-my-custom-meta” part to whatever handle was chosen for the Custom Meta previously created.
[grid_meta key=”eg-my-custom-meta”]
![](http://www.themepunch.com/wp-content/uploads/2018/07/meta-shortcode.jpg)
4. Add the following code to your theme’s “functions.php” file
add_shortcode('grid_meta', 'print_grid_meta');
function print_grid_meta($atts) {
global $post;
$meta = get_post_meta($post->ID);
extract(shortcode_atts(array('key' => ''), $atts));
if($key && array_key_exists($key, $meta)) {
return $meta[$key][0];
}
}
Add Custom Meta to Page or Post via Shortcode