go41

bbpress front-page pagination Items per page

von Joern am 14. Okt. 2009 | Keine Kommentare

It took a while to find out that bbPress 0.9.0.5 doesn’t use pagination on the frontpage.

Having more topics than what is set in admin under ‚Items per page:‘ will make the older ones disappear.

It took a while to find the plugin ‚Topics Per Page‘ ( http://bbpress.org/plugins/topic/front-page-topics/ ) which gives you a pagination bar with page numbers.
Installation went easy, putting it in the my-plugins/ folder after setting the number of topics or posts I wanted on each page. Edit topics-per-page.php to do this.
Now in front-page.php you still have to place the call for the function front_page_pages(); AFTER <?php endforeach; endif; // $topics ?> </table>
Sure putting this code in the file and not activating the plugin first will make your frontpage stop running after this call. It’s better to check first ‚if function_exists‘
In my front-page.php it looks like this now:

<?php endforeach; endif; // $topics ?>
</table>
<?php if (function_exists(‚front_page_pages‘)) { ?>
<div class="nav"><?php front_page_pages(); ?></div>
<?php } // end front_page_pages ?>
Where the first two lines should be already in your file!
Finally in readme.txt it says ‚if you use rewrite slugs you MUST add a rule to your .htaccess‘
The suggested rule RewriteRule ^page/([0-9]+)/?$ /forums/?page=$1 [L,QSA] works well if your forum is installed in a folder called /forums/
I installed it in the root folder of a subdomain, so for this installation I used

RewriteRule ^page/([0-9]+)/?$ /?page=$1 [L,QSA]
Now I enjoy pagination on the frontpage of bbPress, thanks to the Contributors _ck_ and mdawaffe
____________________
you find me on Google+, Twitter and Facebook

(von: master)

Hier noch 1 weitere Ergebnisse dieses Threads:

Re: bbpress front-page pagination Items per page :: Reply by master

14. Okt. 2009 (von: master)

get the title tag in header.php display the current pageswitching pages works well with the plugin explained above, but the title of the forum will always just show the forums name.On page two however we have another URL and different…

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: