How to make my logged-in user-role shortcode displaying name instead of slug?

Based on what you wrote, you should use instead : if ( ! is_admin() ) { function get_user_role() { global $wp_roles; $user = wp_get_current_user(); $roles = ( array ) $user->roles; foreach ( $roles as $role ) { $user_role=”<p>” . $wp_roles->roles[ $role ][‘name’] . ‘</p>’; } return $user_role; } add_shortcode( ‘display_user_role’, ‘get_user_role’ ); } It works … Read more

Gutenberg InnerBlocks noallowedblocks on parent but allowedblock on Child

You need to set templateLock=”all” on InnerBlocks: <InnerBlocks template={SLIDER_TEMPLATE} templateLock=”all” allowedBlocks={ [ ] } /> This locks the inner blocks to the blocks that were inserted using the template. The user should still be able to add inner blocks to the give-camp/gc-slider-items block, but they will not be able to add, move, or delete the … Read more