There are times when you want to impress your visitors by displaying a random theme when they visit pages on your website. This method does not affect members of your website who have already selected their default theme.

Example:
Random PHP Nuke themes

Files to edit:
mainfile.php

Steps :
1. This is actually a very easy tutorial. First open mainfile.php and search for the function get_theme() . This function as some of you know controls which theme is displayed.
We are looking for the following codes:

The main part we are concerned with is the following :

We will now replace the above line with the following:

Now to explain the above code. The script opens the themes folder and gets a list of all the available themes. It then gets a random theme and display it to the visitor.

That's it! Enjoy and please Back Up as usual before making any major changes.

If you would like us to make the changes for you, please contact us by using this button.