Child Theme Authoring: BuddyPress for Layers
BuddyPress should activate and operate without issues in Layers, but it will not recognize specialized control in Layers such as sidebar layouts, Builder Widgets or color customization. Depending on the features you activate in BuddyPress Settings, you may also have challenges getting some of the group or profile management options to appear in the page templates. This is pretty normal, as BuddyPress requires special template hooks in your theme, which are not built into Layers by default.
- Ensure all BuddyPress page templates are set to the “Default” page template for full-width, or BuddyPress Sidebar for a right sidebar.
- Ensure Comments are off on your main BuddyPress pages.
- Add BuddyPress links to a new Menu and assign it to one of the Top Menu positions to create the toolbar
Download Child Theme
We have created a stater child theme specifically for BuddyPress users to help you get started with advanced theme customization. This theme will solve most BuddyPress content visibility issues and provide you with a sound way to manage further custom templates or functions you may need to add. Please note that this is not an official Layers product and is provided as-is without support.
- Log in to your WordPress admin panel, go to ADD NEW at the top and click
- Click the UPLOAD THEME button at the top
- Select the file and click Open.
- Click INSTALL NOW to begin the installation.
- Wait for the success message, then click the Activate link.
You may not see update notifications for Layers with a child theme active. Remember to check for updates periodically under →
You can add widgets to the BuddyPress sidebar from Appearance → Customize under the Edit Layout section while viewing a page linked to the BuddyPress Sidebar page template. These widgets may also be set under Appearance Widgets.
This sidebar is designed for sidebar widgets and may not work well with Layers builder widgets. Developers interested in extending this child theme may use hooks to add additional widget areas to BuddyPress views.
This child theme is extremely simple compared to our tutorial theme, as it sets out to do one primary thing, which is provide a basic page template for BuddyPress to hook into and display its interactive functionality. It contains the following:
Contains basic styles for BuddyPress and Layers-specific fixes.
Contains basic enqueue of parent stylesheet and registration of the BuddyPress sidebar.
This template is very similar to the page.php from the parent theme with the following primary differences required to work with BuddyPress:
- Removal of page Featured Image call
- Removal of post type condition for content container tags
- Addition of template-specific action hooks
This is an additional template that includes support for the BuddyPress sidebar. To make this possible we needed to remove the layers_center_column_class on the <article> container and set the class manually:
<article class="column span-8">
The sidebar is then called within the <div class=”grid”> wrapper:
<?php get_sidebar('buddypress'); ?>
Separate sidebar for BuddyPress Sidebar pages. Uses default Layers sidebar classes and structure.
This child theme includes four hooks: