[Support request] How to remove all GP sidebar?

Home Forums Support [Support request] How to remove all GP sidebar?

Home Forums Support How to remove all GP sidebar?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #606674
    DIMO Software

    Hi
    What is filter to remove all default sidebars generated by GP in /wp-admin/widgets.php?
    Don’t want to hide them, but really do not want any of them because we are building a full Elementor website. thank you

    #606899
    Leo
    Staff
    Customer Support

    Hi there,

    You can remove them globally here:
    https://docs.generatepress.com/article/sidebar-layout/

    Let me know if this helps.

    #606922
    DIMO Software

    But that do not remove them from, this, below, does, I’m not sure it the clean/right way to do it…

    add_action( ‘widgets_init’, ‘remove_some_sidebars’, 99);
    function remove_some_sidebars(){
    unregister_sidebar( ‘sidebar-1’ );
    unregister_sidebar( ‘sidebar-2’ );
    unregister_sidebar( ‘header’ );
    unregister_sidebar( ‘footer-1’ );
    unregister_sidebar( ‘footer-2’ );
    unregister_sidebar( ‘footer-3’ );
    unregister_sidebar( ‘footer-4’ );
    unregister_sidebar( ‘footer-5’ );
    unregister_sidebar( ‘footer-bar’ );
    unregister_sidebar( ‘top-bar’ );
    }

    #607074
    Leo
    Staff
    Customer Support

    Looks correct to me.

    Tom provided something similar before:
    https://generatepress.com/forums/topic/unregister-widget-areas/#post-334993

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.