Twenty Seventeen 二〇一七主題

Twenty Seventeen 二〇一七主題

Codex Home → BuddyPress Theme Development → BP Theme Compatibility and the WordPress Default Themes → Twenty Seventeen Theme
Twenty Seventeen Theme

To change Twenty Seventeen』s default two-column layout to a full width layout as seen in the image above, add the following code to the `functions.php` file of your Twenty Seven child theme:
?12345678910// Remove the page-two-column CSS class from the body class in BuddyPress pagesfunction bp_remove_two_column_body_class($wp_classes) {    if( function_exists ( 'bp_loaded' ) && !bp_is_blog_page() ) :        foreach($wp_classes as $key => $value) {             if ($value == 'page-two-column') unset($wp_classes[$key]);        }    endif;    return $wp_classes;}add_filter('body_class', 'bp_remove_two_column_body_class', 20, 2);

發表回覆

您的電子郵箱地址不會被公開。 必填項已用 * 標註