Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sidebar on left for Forums, then right for Forum and Topic – Why?


  • demonboy
    Participant

    @demonboy

    Going nuts, here. I’m using an Avada child theme and I’m fairly au fait with CSS and getting under the bonnet with PHP (commenting stuff out etc), though I’ve not done much aside from a few CSS changes.

    My forum home has the sidebar on the left. The problem is when I click into a forum, (so the URL is http://www.lizcleere.com/forums/forum/assignments/, for example), the sidebar now jumps to the right. Same when I click into a topic.

    What isn’t explained very well is the use of the additional slugs. ‘Topic’ is set as the slug ‘topic’, so surely it stands to reason that I create a ‘topic’ page, format it how I want the ‘topic’ section to appear, and save it with the name ‘topic’. I’ve tried that and it doesn’t work.

    I’ve also tried disabling the WP Tweaks plugin, removing the inactive widgets, logging out, logging back in, reactivating etc etc. Nothing.

    I then took a copy of Avada’s single.php and renamed it forum.php and made it a template. I’ve called that template up on my Forum page and the sidebar appears on the left, as intended. (Actually, it’s the Blog sidebar, even though I’ve set it to BBPress sidebar, but that’s another story.)

    Why do ‘forum’ and ‘topic’ not inherit the properties I set on the forums page (i.e. default layout (not 100% width or full page or anything like that), sidebar on left, using the forum template page)? I feel like I’m missing something really obvious…

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

  • demonboy
    Participant

    @demonboy

    Well, I guess I should put my money where my mouth is when I say I’m fairly au fait with CSS! I managed to solve it and it was pretty obvious. Just swap the floating elements from left to right, where content becomes right and sidebar becomes left. Remember to end with the !important to override any other CSS. Code is thus:

    .bbpress.single-forum #main #content {float:right!important;}
    .bbpress.single-forum #main #sidebar {float:left!important;}
    .bbpress.single-topic #main #content {float:right!important;}
    .bbpress.single-topic #main #sidebar {float:left!important;}

    Robin W
    Moderator

    @robin-w

    great – glad you’re fixed !!

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