Hello there,
Try adding this snippet:
add_shortcode('portable_hook', function($atts){
ob_start();
$atts = shortcode_atts( array(
'hook_name' => 'no foo'
), $atts, 'portable_hook' );
do_action($atts['hook_name']);
return ob_get_clean();
});
add_filter( 'the_content', 'insert_custom_hook', 20 );
function insert_custom_hook( $content ) {
global $post;
$inserted_hook = do_shortcode('[portable_hook hook_name="after_post_content"]');
if ( is_single() && ! is_admin() ) {
return $content . $inserted_hook;
}
return $content;
}
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
After activating this PHP snippet on your site, you can hook things at the end of the content using after_post_content hook.