How To Lock Lander Features In Place (and Make WordPress Back End Client-Proof)

Lock-lander-wp-genesis

As WordPress developers, we have come across the clients who love to tinker with WordPress and more often end up breaking the site. Sometimes the menu item goes missing and the other time the contact form vanishes.

Moreover, if you are using a theme which offers the options panel or if you have built the site using one of those page builders and your client gets creative with it… you will end up doing more work fixing the site than expected.

This is one of the common concerns of the WordPress developers:

Giving something so flexible to a client is certainly going to cause problems…

We had these concerns in mind even before we started building Lander. We designed Lander intelligently with all the developer features in place.

Lander offers robust settings and options to make it easy for the developers to build the websites powered by Genesis. And Lander addresses the concerns of the developers by offering the ability to deploy Lander in stealth. All the Lander features can be locked and their UI can be hidden by a mere call to add_theme_support or remove_theme_support.

Deploy Lander Website Builder in stealth

When you hand over the WordPress back-end to the client, lock the Lander settings so that your client is not able update the settings and break the site. Follow the steps given below:

Hide Lander Settings Panel

Lander settings panel includes all the admin settings like design selector, widget area configuration, global mobile template settings and debug tools.

To hide Lander settings panel, add the following line of code to your design’s functions.php.

add_theme_support(lander-admin-deploy);

Hide Lander Design Settings Panel

Lander design settings panel features design controls for setting layout widths, layout styles and typography settings (font-family, font-size, color, etc).

To hide Lander design settings panel, add the following line of code to your design’s functions.php.

add_theme_support(lander-design-deploy);

Hide Lander Branding Screen

Lander Branding settings enable you to upload favicon and header image for the site.

To hide Lander branding settings, add the following line of code to your design’s functions.php.

add_theme_support(lander-branding-deploy);

Note: Depending on the technical level of the client, you can hide one or more settings screen. To hide all the screens in one go, use the following line of code: add_theme_support(lander-deploy);

Remove Lander Custom Menu Locations Meta-box

Lander adds a custom menu locations meta-box on per page per post basis to allow setting up SILO menus. Once the menus are set, you can remove this meta-box by adding the following line of code:

remove_post_type_support( 'page', 'lander-custom-menu-locations' ); //removes Lander Custom Menu Locations meta-box from WordPress Page editor

remove_post_type_support( 'post', 'lander-custom-menu-locations' ); //removes Lander Custom Menu Locations meta-box from WordPress Post editor

Remove Lander Landing Page Experience Meta-box

Lander landing page experience meta-box provides the settings to show / hide header, page or post tile, breadcrumbs, widget areas, footer widgets and footer on per page per post basis. You can remove this meta-box by adding the following line of code:

remove_post_type_support( 'page', 'lander-landing-page-experience' ); //removes Lander Landing Page Experience meta-box from WordPress Page editor

remove_post_type_support( 'post', 'lander-landing-page-experience' ); //removes Lander Landing Page Experience meta-box from WordPress Post editor

Remove Lander Mobile Experience Settings

Lander mobile experience meta-box provides the settings to show / hide header, page or post tile, breadcrumbs, widget areas, footer widgets and footer on per page per post basis for mobile viewport. You can remove this meta-box by adding the following line of code:

remove_post_type_support( 'page', 'lander-mobile-experience' ); //removes Lander Mobile Experience meta-box from WordPress Page editor

remove_post_type_support( 'post', 'lander-mobile-experience' ); //removes Lander Mobile Experience meta-box from WordPress Page editor

Remove Lander Landing Sections

Lander landing sections panel allows you to add unlimited full-width sections to any page or post. You can easily create landing sections for your client’s site and then freeze these sections to ensure that client doesn’t break them by adding the following line of code:

remove_post_type_support( 'page', 'lander-landing-sections' ); //removes Lander Landing Sections meta-box from WordPress Page editor

remove_post_type_support( 'post', 'lander-landing-sections' ); //removes Lander Landing Sections meta-box from WordPress Post editor

The best part of hiding Lander settings is that even when you hide the settings panel and meta-boxes, the settings are preserved and you can enable them in case you want to update the settings later.

Bonus: Make WordPress Back End “Client-Proof”

This tip makes way from my WordPress website deployment workflow. Once the site is ready for handover and Lander is deployed in stealth, I review the WordPress admin area and take the following steps before finally handing over the site to the client:

Disable admin menus

You may mot want to give complete access of WordPress admin area to your client. If that’s the case, you can create another user, assign “administrator” role and depending on client’s technical know-how disable the admin menus for specific administrator. Check out this neat cheat here.

Disable Theme and Plugin Editor

WordPress hosts a file editor in the back end (Appearance > Editor) which allows you to edit theme and plugin files from the admin area itself. These files are very sensitive and one wrong edit can potentially crash the site. It is advisable to disable the file editor before handing the site to the client.

Add the following line on code to wp-config.php:

define( 'DISALLOW_FILE_EDIT', true );

Remove unused Widget areas

If your theme defines multiple widget areas and you are not utilizing those widget areas in the design, it is better to remove them. For example, Lander defines 3 widgetized CTA areas (Before Header, After Header and Before Footer Widgets). If the client’s site design doesn’t utilizes these areas, I generally prefer to unregister these widget areas to avoid any kind of confusion for the client.

Add the following code to your theme’s functions.php:

// Unregister secondary sidebar.

unregister_sidebar( 'sidebar-alt' );

// Remove theme support for After entry widget

remove_theme_support( 'genesis-after-entry-widget-area' );

// Unregister Custom Widget Areas defined by theme

add_action( 'widgets_init', 'lander_unregister_sidebars', 11 );

function lander_unregister_sidebars () {
unregister_sidebar ('before-header');
unregister_sidebar ('after-header');
unregister_sidebar ('before-footer');
}

Unregister Unused Layouts

Genesis provides six layouts and Lander supports all of them. Before handing over the site to the client, I review the layouts and unregister the layouts which are not the part of the website design.

Add the following code to your theme’s functions.php:

/* Unregister Layouts */
genesis_unregister_layout( 'full-width-content' );
genesis_unregister_layout( 'content-sidebar' );
genesis_unregister_layout( 'sidebar-content' );
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content-sidebar' );

What steps do you take to make ensure that WordPress admin area is safe for your clients?

Divi WordPress Theme