Is there any way to use a different theme file for a Mediawiki's front page, while the rest of the wiki uses the standard theme you set? For example, say I use Monobook.php for all of my regular pages, but Custom.php for my wiki's front page. I can't find anything that would allow me to do this.

1 Answer 1


Sure. All you need to do is use a hook, check if the current $wgTitle is the same as the main page title, and if it is, switch the Skin object to a different skin.

The hook you should use for this is RequestContextCreateSkin.

The Skin object is passed by reference there, so you should have no trouble replacing it with a custom skin of your choice.

Good luck.

  • 1
    BeforePageDisplay might be a little late to change the skin. I'd suggest RequestContextCreateSkin instead. Sep 22, 2012 at 18:40
  • Good point. Edited answer.
    – tor
    Sep 23, 2012 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.