Site logo

Archived topic

Remove Generatepress Customizer Options with Child Theme

5 replies · Started by Casey on October 3, 2022

Viewing posts 1–6 of 6

We have a use case, where the Navigation and header customizers, just wont cut it for what we need.
We are going to install our own nav and header into the Child Theme...

however, we are having a bit of trouble removing the options for :

Layout >
- Header
- Primary Navigation
- Secondary Navigation
- Sticky Navigation
- Off Canvas Panel

We are replacing all of this. Everything else can stay.

We have tried to remove just those 5 via Functions - remove_action()

i loaded this into the child - but, i must be missing something, since, its not working.

I've just updated the code I shared - can you try now?

These worked.

// Remove default sections
$wp_customize->remove_section('generate_colors_section'); /* Works */
$wp_customize->remove_section('generate_typography_section'); /* Works */
$wp_customize->remove_panel('generate_layout_panel'); /* Works */
// Remove Generate Blog sections
$wp_customize->remove_section('generate_blog_section'); /* Works */

Still Visible : Based on the code :

// Remove Menu Plus section. - Visible as " Menu Plus "
$wp_customize->remove_panel('generate_menu_plus');

// Remove Generate Backgrounds section - Visible as " Background Images" ( not sure if im correct here )
$wp_customize->remove_panel('generate_backgrounds_panel');

Its getting better for sure.

Layout > - gone
– Header - gone
– Primary Navigation - gone
– Secondary Navigation - Visible
– Sticky Navigation - Visible
– Off Canvas Panel - Visible

Code updated again - should be good to go.

Let me know :)

This archived topic is closed to new replies.