xfpoint

How To Set Custom HTML Pages as Homepage or Index Page in XenForo

Forum list is by default the homepage or the index page for a XenForo installation but you can set any page as the index page or the homepage.

There is no restriction to what page can be set as the index page or the homepage. It can be any specific forum or subforum, a portal page, members page, recent activity page or even page node.

To change the index page or home page of the site, log in to the admin area and browse to the options > Basic Board Information.

Find Index Page Route and add a route to the page that you wish to set as the index page or the homepage.

How to find the page route?

Browse to the page that you wish to set as the homepage and copy its URL.

If you have installed forum at http://example.com/ and have SEO URLs enabled, the member’s page url will be http://example.com/members/ but if you don’t have SEO URLs enabled it will be of the form http://example.com/index.php?members/.

SEO URLs enabled or not, the route of the page is “members” in the above example.

If you wish to set a particular forum/subforum as the index page, browse to the node and copy its url. The url of the page will be of the form http://example.com/forums/test-forum.56/ (or http://example.com/index.php?forums/test-forum.56/ if SEO URLs are disabled)

The route for the forum is forums/test-forum.56 which can be used as the index page route which will make the test forum as the index page or the homepage of the site.

If you wish to set a particular node page as the index page, the process is exactly the same and you copy the url of the node page and set it as the index page route.

Node pages in XenForo allow custom HTML or PHP (with a callback) making it super easy to set up any custom HTML as the homepage or custom PHP for the homepage.

Note: Once the index page is different from the list of forums page, /forums becomes the page for the forum list. So the forum page is http://example.com/forums (or http://example.com/index.php?forums if SEO URLs are disabled).

After making the changes to the index page route, always check the index URL and the forum url to make sure they show the content as expected.

Exit mobile version