Hi there,
you could use a WordPress Custom Field to store your ‘code’:
1. Edit a post where you want this applied, and in the Options ( 3 dot menu ) -> Preferences –> Panels enable the Custom Fields.
2. Now at the foot of the editor you can Create a New Custom Field.
Give you field a Name eg. wpgmap
And add the code to the Value field: [wpgmza id="140"]
3. Now each time you create a post where you want to add this custom field you will be able to select wpgmap
from the list and give it a value.
4. With the value stored we can now output that shortcode using a PHP Snippet:
add_action('generate_after_entry_header', function(){
$wpgmap = get_post_meta( get_the_id(), 'wpgmap', true );
if ( $wpgmap && is_single() ) {
echo do_shortcode( $wpgmap );
}
});
This will display it on the single post after the Entry header.
Adding PHP: https://docs.generatepress.com/article/adding-php/