Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forums index in the same layout as other bb software


  • Kaliceos
    Participant

    @kaliceos

    Hi,

    I’m in the process of migrating a phpBB forum to WordPress with bbPress. I don’t know if the bbPress style is better but my users are used to the phpBB style for displaying Forums on the main page. So I tried to reproduce that layout in bbPress using categories. With the default theme, I was not happy with the way it looked. After a quick search in these forums, I saw some interesting topics from @lynq (here and there) but it didn’t work as intended in the last bbpress release and ticket #1958 has been moved to 2.6.

    So after a few hours of searching codex, and a lot of tries, I managed to do what I wanted. As there is still some demand in Lynq’s topic, I thought I should share my little work.

    I’m not a developper, so my code may be a little messy, but it works as intended. I’ve tried using the bbpress functions, and commented my code. If any PHP expert would like to review it and make it better, any feedback is welcome.

    The only file to change is loop-forums.php with this code.
    You just need to create it and paste the code. Then upload it to /wp-content/your-theme/bbpress/. Use a child-theme if you don’t want to loose it on next theme update.

    The forums are not yet online, so here are some screenshots with descriptions. (In French, because, as you may have noticed, English is not my native language 🙂 )

    I’ve tested many situations (even a category inside a forum, which bbpress doesn’t consider anymore as a category, probably normal behavior) and I think everything works as intended. Feel free to report any bug.

Viewing 17 replies - 26 through 42 (of 42 total)

  • palmdoc
    Participant

    @palmdoc

    Hi I’m really keen on this layout rather than the default Forum index layout in bbPress.

    I have created the loop-forums.php with the code and placed it in the bbpress folder of my child theme (I am using Buddyboss)

    However having done that, my Forum index page still remains unchanged
    The page just has
    [bbp-forum-index]

    Advice much appreciated


    martynjhon
    Participant

    @martynjhon

    Thanks for the suggestions……………..


    peterson10015
    Participant

    @peterson10015

    Sounds like a good one..

    Thanks.


    Kaliceos
    Participant

    @kaliceos

    @palmdoc : Hi, I don’t know the structure of your forums as the access is restricted, but do you use categories ? If not, try using them, it should structure your forums as you want. For example, if Dobbs General was a category, its subforums would be listed as forums on the main page.


    palmdoc
    Participant

    @palmdoc

    Ahh @kaliceos I get it now. Yes If I set a forum as a category it will display the structure. Unfortunately I have some I have set as subforums of a forum which already has discussions so if I change that into a category I will lose all the discussions there right?


    Bob1nz
    Participant

    @bob1nz

    @palmdoc

    Check out the files i have in my pastebin http://pastebin.com/u/Bob1nz
    these were what I used with buddyboss a wee while ago using @kaliceos code

    Just make the four files and drop them into \buddybosschildtheme\bbpress\


    palmdoc
    Participant

    @palmdoc

    Thanks. I tried your 4 files but unfortunately I got an almost blank forum directory 🙁


    Kaliceos
    Participant

    @kaliceos

    @palmdoc : You will not loose any discussion if you change the forum type to Category but the discussions won’t be shown anywhere as the topics don’t have any parent related. The best solution I can think of is to change the name of the forum that you would like to use as a category to something generic like ‘General’ and create a category that is a parent of ‘General’ and the other subforums you had previously.

    But as I check again the link to your website, I see that you’ve found a way to organize your forums 🙂


    palmdoc
    Participant

    @palmdoc

    Thanks once again @kaliceos!


    christicehurst
    Participant

    @christicehurst

    FINALLY – Someone has has been able to turn bbpress into something with clean look goods. Top marks to you sir. This MUST be added to bbpress in it’s core


    pcwriter
    Participant

    @pcwriter

    @kaliceos

    Brilliant!

    Exactly what I was looking for today while tweaking stuff in my project. 🙂

    Thanks a bunch for saving me hours of searching & templating.


    AdventureRidingNZ
    Participant

    @adventureridingnz

    Thank you so much, this so should be in the core build.


    pomelo
    Participant

    @pomelo

    @kaliceos , thanks a lot, this is exactly what I was looking for !!!!


    pixelnated
    Participant

    @pixelnated

    absolutely perfect. Thank you!


    stigolsen
    Participant

    @stigolsen

    Hi,

    Im a total newbie and I have the socute theme trying to integrate this code.
    I have this “socute child theme” that holds the folders : cache, woocommerce and woocommerce_2.0x.
    There are not wp-content/your-theme/bbpress/ in the child theme. So where should I put the file loop-forums.php?

    In my socute original theme I find the loop-forums.php in the following folder: wp-content\plugins\bbpress\templates\default\bbpress
    Should I remover this file from this place, edit it by removing everything that is already in that file and paste the code that you suggest? And where to put the file afterwards when I dont have the directories you are telling me about?

    And one last question:

    What should I do with the code written below “RAW Paste Data”?

    I really appreciate if some of you please can help me with this total newbie questions. It will help me have a good start with learning this.

    Thanks

    All the best, Stig


    Kaliceos
    Participant

    @kaliceos

    Hi @stigolsen

    What you should try :
    (- read https://codex.bbpress.org/amending-bbpress-templates/ )
    – create a folder named “bbpress” in your theme’s folder
    – create a loop-forums.php file in it
    – copy+paste the content linked in loop-forums.php (click the third button just above the first line of code in pastebin.com, then use Ctrl+C to copy)
    – upload this new file in its new folder on your server

    That should be OK. Be careful when you update your theme, the loop-forums.php may be deleted.


    ernstl
    Participant

    @ernstl

    Nice Job @Kaliceos and greetings from Germany 🙂

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