Skip to:

previous/next thread navigation

  • I would like to include previous/next thread navigation on the topic page. I have not been able to determine if this functionality is built in, or if there is an easy way to add it in my template. Does anyone have any ideas? Any and all help with be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • There is a page number plugin available in the Extends section.

    i’m not really referring to page numbers or pagination. Basically what i want is that when a user is looking at an individual thread, that in addition to the regular pagination options, they also have the option to go to the next thread, or the previous thread, not the next or previous page of a topic.

    Ahh, sorry for the misunderstanding, that suff is over my head.

    This is definitely worth doing. bbPress needs to have template functions that allow you to get the ‘next’ or ‘previous’ forum and topic. This would allow themes to include nice navigation links like ‘Next Thread’, ‘Next Forum’ instead of always having to jump to the front. WordPress does this for posts.

    I’ve looked all around and I’m just not seeing anything like this.

    I’m going to mess around with some code – it looks like the BB_Walker has a stepping ability built in that SHOULD make this pretty trivial, but I’m still getting comfortable with the inner bbPress classes and such. I’ll post here if I come up with anything. If anyone else has tried this or knows of a plugin that exists already – let me know. I couldn’t find one. Again – this isn’t pagination when you have lots of posts/threads. This is when you are in a topic or post view, being able to navigate to the next post, thread, or forum – i.e. like flipping pages of a book.

    I put together a plugin that will allow you to include navigation links to flip forward or backward through forums and/or topics within a forum.

    This is a first stab. No online config, etc. yet – just the main code to get the right links and forum/topic IDs. I hope to add some things to it and improve the API a bit to let templates get individual ‘next’ or ‘previous’ links.

    I ended up having to do direct DB queries – I couldn’t find a way in the main bbPress code to get me the info I needed, but I’m not super familiar with the core code either so I may have missed something. But no functions or class methods jumped out at me.

    I’ll post the bbPress plugin URL for it once it’s approved, but you can download it from the link above.

    Here’s a look at what it does on a forum I’m still setting up/messing with.

    Topic Nav – look in the meta section under the RSS link:

    Forum Nav – look under the list of topics:

    Yes – I know the forum navigation disappears in forums with no posts – side effect of the action hook I used to insert (it seems to return without applying filters when there are no posts – which I guess makes sense if you’re figuring there’s nothing to ‘filter’. But many filers append :( )

    This definitely makes navigation for my setup much easier.

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