Access to code based on Level

what is I want to hide a peace of code in buddypress theme - for example "Create a Group" button in line 44 of /wp-content/themes/child-buddypress/groups/index.php ?

<h3><?php _e( 'Groups Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?>  <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/create/' ?>"><?php _e( 'Create a Group', 'buddypress' ) ?></a><?php endif; ?></h3>

if I just close it with Membership Shortcode, like in post, it doesn't work.

[level-one]<h3><?php _e( 'Groups Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?>  <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/create/' ?>"><?php _e( 'Create a Group', 'buddypress' ) ?></a><?php endif; ?></h3>[/level-one]

would there be any other way to structure it ?