buddycore / surface-theme

WordPress + BuddyPress + BBPress Theme
4 stars 1 forks source link

How remove sidebar from messagess? #54

Closed inzerat closed 7 years ago

inzerat commented 7 years ago

Where on FTP is a file?

buddycore commented 7 years ago

To remove the sidebar for messages go into

members/single/home.php then you will need to add some logic like this

if(!bp_is_user_messages()) : get_sidebar(); endif;

Which basically means, if we are in members component and not on messages show the sidebar.

You will also need to modify the CSS to make the message content full width by doing something like this inside of style.css

body.messages div.main-col { width: 100% }

That should be all you need.

inzerat commented 7 years ago

I add this and nothing...

`.................. <?php do_action('bp_before_member_home_content'); ?>

<div id="item-body">

    <?php

    do_action('bp_before_member_body');

    if(!bp_is_user_messages()) : get_sidebar(); endif;

    if(bp_is_user_front()) :

        if(bp_displayed_user_use_cover_image_header()) :
            bp_get_template_part('members/single/cover-image-header');
        else :
            bp_get_template_part('members/single/member-header');
        endif;

..............................`

What i do wrong?

buddycore commented 7 years ago

if(!bp_is_user_messages()) : get_sidebar(); endif; this goes on line 1 of file surface/buddypress/members/single/home.php

then add the style to style.css

and finally go into surface/asset/php/wp/init.wordpress.php and on line 17 create a new line and add this

wp_enqueue_style('style-override', get_stylesheet_uri());

I have tested these steps myself and they certainly do work. Let me know how you get on.