With the lastest version of WordPress (4.3) you can now natively remove the customizer’s theme switch setting without resorting to CSS hacks.
/**
* Remove customizer options.
*
* @since 1.0.0
* @param object $wp_customize
*/
function ja_remove_customizer_options( $wp_customize ) {
//$wp_customize->remove_section( 'static_front_page' );
//$wp_customize->remove_section( 'title_tagline' );
//$wp_customize->remove_section( 'nav' );
$wp_customize->remove_section( 'themes' );
}
add_action( 'customize_register', 'ja_remove_customizer_options', 30 );
Related Posts:
- Display a different theme for not logged-in users
- Get password when user registers and save it sha1 into database
- Passing variable in hooks and filter
- Highlight “Show all” item in wp_list_categories
- Menu item added in wp_nav_menu_items filter is never highlighted
- Pass variable to hook. Its possible?
- Theme Customizer not loading JS for live preview
- How to change footer credit text in Twenty Twenty One theme with a hook?
- Modify available templates (in dropdown)
- Related Post Category Filter
- How to register dynamic settings in WordPress Customizer?
- WordPress wp_get_current_user returning blank values until refresh
- what is do_action(); in wordpress? [duplicate]
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- How To extend WP_Customize_Control
- How do I remove a pre-existing customizer setting?
- get_template_part vs action hooks in themes
- Theme Activate Hook
- Issues with title-tag and document_title_parts
- Theme customizer – settings order
- Custom Image section in Customizer
- Get entered value of customiser field for live preview
- Add custom classes to anchor in wp_nav_menu
- What filters are applied to the_content function?
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- Change admin bar to default:off
- How to modify an image block in Gutenberg WordPress 5?
- Add a dropdown to theme customizer
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- Theme Customizer : how to create multiple-level panel
- Allow Shortcode in Theme Customizer
- Theme Customizer – Nested Sections?
- Getting instance variable in scope of ‘wp_enqueue_scripts’
- Customizer Active Callback not working
- Can I create customizer setting that can handle plugin shortcode?
- wp_get_attachment_image_attributes not working for me
- Editing the custom background CSS
- How to execute conditional script when on new customize.php (Theme Customize) screen
- Is the theme customizer slowing down my site?
- Trigger Customizer saving process with Javascript only
- How do I Make a Theme “plugin-ready”?
- Adding customizer styles with wp_add_inline_style
- What can I hook into after_setup_theme?
- Run shortcode before filters
- Add class to before_widget for all widgets with a dropdown and a counter
- How to Auto Approve Comments on a Specific Page?
- WordPress Customizer Typography: How to load just the unique Google Fonts?
- Identifying the priority of style.css so I can make a small CSS file load last
- WordPress Customize — Move “menus” options / field to another section
- Can we add more than one control under a setting in WP theme customizer?
- Widgets panel not displaying in the Theme Customizer
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Is it possible to display the admin bar while in the Theme Customizer?
- How do I get a parent theme modification from a child theme?
- Changing the entire control choices using wp.customize with JavaScript
- How to Change CSS Variable value in Theme Customizer Live Preview
- How to remove menus section from WordPress theme customizer
- Get background color for Live Preview with Theme Customization API?
- Checking if there is an Image inserted – if not don’t display anything
- wp_enqueue_scripts not called on search page?
- “Display Site Title and Tagline” checkbox not working?
- WordPress nav_menu_css_class theme filter is not being called
- How to set page template on front using starter content?
- customizing the_password_form filter
- Default header image does not display
- WordPress Customizer Control with React
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- Modify Javascript Configuration Options for Theme Customizer Colour Picker
- Modify the Additional CSS section (adding a disclaimer)
- How to change the customizer´s sidebar width?
- Theme Customizer – Choose where widget area appears, to let users organise widgets
- WordPress Genesis Child Theme Filter divs
- wordpress custom theme import and export options for sample data [closed]
- How to hook CSS file according to theme selection in the customizer section
- How i can get widgets areas working in customizer?
- Change file name from wp_generate_attachment_metadata
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Change setting name in Customizer and keep the data
- Creating multiple hooks for theme
- after_setup_theme, Global Variable and Theme Customizer
- Custom Script Section Only Echoes Text
- How to disable automatic colors in the Twenty Twenty theme?
- WordPress not registering Theme Customization Section
- How can i add edit shortcut icon in wordpress customizer without using selective refresh?
- How to add theme support?
- Simple way to get two language WP site
- Add new panel inside parent panel in WP Customize?
- WP Customize refresh problem
- Input ordering in wordpress theme customizer
- Should I use function_exists() and/or add_action() in theme development?
- Unable to pass variable on theme cusomizer add_settings()
- How to add field customizable by the theme editor to your theme?
- Get a setting value conditionally in the Customizer api
- When trying to override plugin’s function by theme, my filter executes two times, I want it to run only a single time
- How to add new args data in $wp_customize->add_setting?
- WP_Customize_Color_Control omitting # symbol
- Hide header texts (Title & Tagline) in custom-header.php
- get_option in header.php not returning value from customizer