Smooth scroll for phpBB WordPress template integration (iframe v3)

This step, suppose you applied the following procedure: phpBB WordPress template integration

To adjust the applied v3 iframe code to smooth scrool you’ll need to edit some little line of code in this way (and read all this):

open the created page-forum(or whatever you named it).php into your active WordPress template folder, and where this code:

immediately after, add this code:

or using jQuery (that will be all browsers compatible):

if using the jQuery piece of code, change value of the class .site-content to match the class name assigned to the element you need to scroll to (site-content is for example the class which you find assigned into the default WP twentysixteen theme and that wrap the site content).

now open your phpBB overall_footer.html to change the Javascript code you added and where this code:

change into:

then where this code:

change into:

Note that if you fail on copy/paste exactly these steps the code will not work. Be accurate and change exactly what needed. Remember to recompile phpBB template when changes applied, and may to empty WP cache if you run some cache plugin on WP side that prevent the modified WP page-forum to be loaded as you modified.

NOTE that using the pure Javascript solution, to fit your theme header and setup to scroll to right position in accord with your WP theme header gap space, you have to change this value into the
page-forum(or whatever you named it).php code you just added:

set the value


to a value between: 0 (zero) if you want to scroll to 0px top, 500 if you want 500px of gap and so on. Test changing value and refreshing your WP page forum until you not see the result you like and that fit your theme header gap space.

These are on fly changes for v3 code that will be finally released as v4 iframe code when further more improvements and/or required fixes discovered along the time applied.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.