• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Removing Registered Layouts

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Removing Registered Layouts

This topic is: resolved
  • This topic has 6 replies, 2 voices, and was last updated 9 years, 11 months ago by Dave Navarro, Jr..
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • June 22, 2015 at 7:12 pm #157249
    Dave Navarro, Jr.
    Member

    I tried the code from:

    Admin Management

    To unregister layouts we don't use on our site, but I get "Undefined function genesis_unregister_layout()" errors.

    I am using the latest release version of Genesis with the Dynamik Web Builder child-theme and I placed the test code in my functions.php

    Was that function removed from Genesis?


    Dave Navarro, Jr. ~ Lead Web Developer ~ Topeka & Shawnee County Public Library
    http://tscpl.org

    June 23, 2015 at 4:50 am #157270
    SavvyJackie
    Member

    Hi Dave,
    Is this the format you are using in your functions.php file?

    https://gist.github.com/studiopress/5700110#file-unregister-layout-settings-php


    Web Designer and Developer at Savvy Jackie Designs | Lucky with plants | @SavvyJackie

    Got your question answered here? Please pay it forward by helping someone else. I’m sure there is at least one question you can answer. 🙂

    June 23, 2015 at 12:53 pm #157320
    Dave Navarro, Jr.
    Member

    This is what I have right now:

    // Unregister sidebar/content layout setting
    
    if ( function_exists('genesis_unregister_layout') ) {
      genesis_unregister_layout( 'sidebar-content' );
      genesis_unregister_layout( 'content-sidebar-sidebar' );
      genesis_unregister_layout( 'sidebar-sidebar-content' );
      genesis_unregister_layout( 'sidebar-content-sidebar' );
    }

    The function genesis_unregister_layout() does not exist at the time this code runs in my functions.php

    I know that the code in functions.php is running because I have other test code that does execute.

    At the suggestion of StudioPress support, I am re-installing the latest release of Genesis.


    Dave Navarro, Jr. ~ Lead Web Developer ~ Topeka & Shawnee County Public Library
    http://tscpl.org

    June 23, 2015 at 12:58 pm #157323
    Dave Navarro, Jr.
    Member

    Just downloaded and installed the latest release and still no go.


    Dave Navarro, Jr. ~ Lead Web Developer ~ Topeka & Shawnee County Public Library
    http://tscpl.org

    June 23, 2015 at 1:16 pm #157325
    SavvyJackie
    Member

    Hi,
    I would try deactivating the Dynamik Web Builder child-theme and testing it on the Genesis Sample child theme to see if you can isolate the issue. If you still have an issue, then contact StudioPress support.


    Web Designer and Developer at Savvy Jackie Designs | Lucky with plants | @SavvyJackie

    Got your question answered here? Please pay it forward by helping someone else. I’m sure there is at least one question you can answer. 🙂

    June 23, 2015 at 1:31 pm #157328
    Dave Navarro, Jr.
    Member

    Okay, I put it into it's own stand-alone plugin and it's still not working. I'll download the sample child theme and try it with that.

    The odd thing is that all of my other Genesis related code works... Just not this one function.


    Dave Navarro, Jr. ~ Lead Web Developer ~ Topeka & Shawnee County Public Library
    http://tscpl.org

    June 23, 2015 at 3:44 pm #157341
    Dave Navarro, Jr.
    Member

    Bizarrely... The issue was load order...

    I added a "add_action" wrapper

    add_action( 'init', function () {
    
      if ( function_exists('genesis_unregister_layout') ) {
        genesis_unregister_layout( 'sidebar-content' );
        genesis_unregister_layout( 'content-sidebar-sidebar' );
        genesis_unregister_layout( 'sidebar-sidebar-content' );
        genesis_unregister_layout( 'sidebar-content-sidebar' );
      }
    
    } );

    And that fixed it. It's definitely something to do with DWB and load order.


    Dave Navarro, Jr. ~ Lead Web Developer ~ Topeka & Shawnee County Public Library
    http://tscpl.org

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Removing Registered Layouts’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble