Hello There,
Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.
After the child theme is set up, please add the following code in your child theme’s functions.php file
// =============================================================================
// Hide Portfolio section in the customizer
// =============================================================================
function my_custom_admin_head() { ?>
<?php if ( is_user_logged_in() ) : ?>
<style>
#accordion-section-x_customizer_section_portfolio{
display: none !important;
}
</style>
<?php endif; ?>
<?php }
add_action( 'customize_controls_print_styles', 'my_custom_admin_head', 999 );
// Unregisters Portfolio in the theme options
// =============================================================================
function x_child_unregister_theme_options() {
cornerstone_options_unregister_section( 'x-portfolio' );
}
add_action('cornerstone_options_register', 'x_child_unregister_theme_options', 25 );
// =============================================================================
We would loved to know if this has work for you. Thank you.