[Resolved] Full Width Layout with "Reddle"-themen
-
I tried to apply the section ‘B. Full Width Layout’-description for my page, where I use the ‘Reddle’-theme.
1st:
I created a new folder wp-content/themes/reddle-child.
2nd:
I created a new file buddypress.php with that content:
<?php /** * BuddyPress: Full-width Page Template, No Sidebar * * A full-width template for all BuddyPress pages. * * @ since Reddle 1.0 and BuddyPress 2.0.3 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template(); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?>
I.e.: I deleted the line
<?php get_sidebar(); ?>
from the page.php of the ‘Reddle’-theme.
3rd:
I created a new file functions.php with that content:
?php // Remove sidebar body class in BuddyPress pages function mme_remove_sidebar_body_class($wp_classes) { if( function_exists ( 'bp_loaded' ) && !bp_is_blog_page() && is_active_sidebar( 'sidebar-2' ) ) : foreach($wp_classes as $key => $value) { if ($value == 'sidebar') unset($wp_classes[$key]); } endif; return $wp_classes; } add_filter('body_class', 'mme_remove_sidebar_body_class', 20, 2);
4th:
I created a new style.ccs with that content:
/* Theme Name: Reddle Theme URI: http://theme.wordpress.com/themes/reddle/ Author: Automattic Author URI: http://automattic.com/ Description: Everything about Reddle's minimal design elegantly adapts to how you want to use your blog and what you want to use it for. Want to use your blog for a simple one-column link blog? A two-column business site with a custom header and no posts? Reddle can do that too — and look good doing it too. Version: 1.3.1 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: red, white, one-column, right-sidebar, two-columns, fixed-width, flexible-width, custom-background, custom-header, custom-menu, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready Reddle, Copyright 2014 Automattic, Inc. This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. */ @import url("../reddle/style.css"); /* =Theme customization starts here -------------------------------------------------------------- */ .buddypress .entry-header, .buddypress .entry-content, .buddypress .entry-summary, .buddypress .entry-meta { max-width: 1040px; width: 100%; } @media (max-width: 1069px) { .buddypress .entry-header, .buddypress .entry-content, .buddypress .entry-summary, .buddypress .entry-meta { padding-left: 20px; padding-right: 20px; } }
5th:
I uploaded all three files to the ‘reddle-child’-folder; but the sidebar is still displayed.
Vague suspection: The ‘Reddle’-equivalent for the ‘sidebar body class’ in the ‘Twenty Thirdteen’-theme is called different. – But how can I recognise, what is in the ‘Reddele’-theme the equivalent for the ‘sidebar body class’ in the ‘Twenty Thirdteen’-theme?
- The topic ‘[Resolved] Full Width Layout with "Reddle"-themen’ is closed to new replies.