Hi there!
I have an issue with adding blocks of Ultimate Addons for Gutenberg to element blocks. When added to an element the scripts (CSS, JS) are not loaded compared to just adding such a block to a page or a post.
add_action( 'wp_enqueue_scripts', 'enqueue_scripts_by_post_id' );
function enqueue_scripts_by_post_id() {
// Create Instance. Pass the Post ID.
$post_assets_instance = new UAGB_Post_Assets( $post_id );
// Enqueue the Assets.
$post_assets_instance->enqueue_scripts();
}
What I don’t know:
– How can I actually pass a specific post id?
– How can I adjust the code so that it applies to a specific post type or all pages?
Many thanks in advance!
PS: after having used this support forum already and having received great help. Is there a way to donate some money to the team?