Reddle – BP Theme Compatibility

Reddle theme

This is a simple walk through to make all BuddyPress pages full-width using the Reddle theme.

1. Create a child theme of the Reddle theme.

2. Create a new file in your new child theme folder and name it buddypress.php. If you need a full-width layout for your bbPress forums, create a file named bbpress.php as well.

3. Insert the following into your new buddypress.php and/or bbpress.php file/s.

<?php
/**
 * BuddyPress: Full-width template
 *
 * A custom page template without sidebar.
 *
 * @ since Reddlle 1.3.1 and BuddyPress 2.1
 */
get_header(); ?>
 
	<div id="primary">
		<div id="content" role="main">
			<?php while ( have_posts() ) : the_post(); ?>
				<?php get_template_part( 'content', 'page' ); ?>
			<?php endwhile; // end of the loop. ?>
		</div><!-- #content -->
	</div><!-- #primary -->
 
<?php get_footer(); ?>

4. Add the following styles in your child theme’s style.css file then save the file.

.buddypress #main #primary {
    margin: 0;
}

.buddypress #main #content {
    margin: 0 9.46429%;
}

5. Create a new file functions.php in your child theme folder and add the following then save.

<?php
/**
 * Enqueue stylesheet
 */
function reddle_child_theme_stylesheet() {
	wp_enqueue_style( 'reddle-child-themestyle', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'reddle_child_theme_stylesheet' );

5. Upload your Reddle child theme folder to your server.

6. Activate the Reddle child theme in wp-admin menu Appearance > Themes.

Advertisements