Skip to:
Content
Pages
Categories
Search
Top
Bottom

Full Width


  • snorklebum
    Participant

    @snorklebum

    Hi,

    WP:4.5.3 BP:2.6.0 Theme:twentyfourteen

    I currently have my main page with a primary sidebar and content sidebar, I’ve set all other pages to use the full width template which seems to be working for events etc but buddypress only follows this setting on the main groups and members pages. As soon as I navigate to a group or member page it no longer uses that template is this correct behaviour?

    I have tried adding an if around the get_sidebar but this just leaves the area empty which I’m guessing is a css issue.

    I also tried copying the page-templates\full-width.php file to a child theme and renaming to buddypress.php but this also has the same effect of the empty space at the side.

    Any advice would be greatly appreciated.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

  • snorklebum
    Participant

    @snorklebum

    I’ve done a bit more digging and using the renamed full-width.php -> buddypress.php it looks like I just need to get full-width in to the body class to get the result I’m after.

    As a logic test within header.php under the <body… line I added <?php if (!bp_is_blog_page() ) { ?> ‘full-width’ <?php }?> which then displays that piece of text at the top of each of the pages I expect.

    When I try and replace

    <body <?php body_class(); ?>>

    with

    <body <?php body_class(if (!bp_is_blog_page() ) { ?> ‘full-width’ <?php }); ?>>

    I just get an empty page.

    I’m probably missing something very simple


    snorklebum
    Participant

    @snorklebum

    Ok apologies for replying to myself but I’ve finally fixed and hopefully it’ll help someone else in the future.

    <body <?php if ( !bp_is_blog_page() ) { body_class( ‘full-width’ ); } else { body_class(); } ?>>

    The code above works with the child theme and renamed full-width.php file.


    Lars Henriksen
    Participant

    @adjunkten

    Hi Snorklebum,

    Thanks for sharing – can I see your page?

    I would like to use a full-width template for group pages only.

    Did you just upload a file named ‘full-width.php’ in you child theme with

    <body <?php if ( !bp_is_blog_page() ) { body_class( ‘full-width’ ); } else { body_class(); } ?>> ?

    How do you activate full-width for buddypress groups only – code says ‘blog_page’?

    Thanks,

    Lars


    danbp
    Moderator

    @danbp

    Check here how it works for groups – it’s a bit different since 2.4
    Get Ready! 2.4.0 will introduce important changes in Groups homes


    neevahave
    Participant

    @neevahave

    thanks for sharing . it we help others to identify problem .

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar