Auto Change Background Image for all Oxwall Versions
they are so beautiful that you want a different image to appear each time a user refreshes your website. You have been pondering on how to achieve this effect when it suddenly pop into your head to make a google search and it landed you here.
- Login to ypur cpanel/ftp
- Create a new folder “elitesbg” in your public html.
- Assuming you have created 3 amazing images kindly save them in this format: “1.jpg” “2.jpg” “3.jpg” and copy this images to elitesbg you have created earlier.
- Login to your admin dashbord
- Goto Settings and click on Main Settings.
- Click on Page Settings
- In the custom head code, add the following code:
- Then copy the following code into custom tail code:
In the above code: variable totalCount is number of backgrounds. The Math.random() method returns a random number between 0 and 1 and the Math.ceil() method rounds a number towards to the nearest integer, and returns the result.
Note: Your images must be in .jpg format
Any difficulty? Post your comments.
Latest posts by Ebenezer Obasi (see all)
- Awale, Backgammon and 1 other Game Technology has transformed - October 23, 2016
- Oxwall MySQL Database (OWSQL101): How to Add, Retrieve or Delete Values in Oxwall Config Database - October 23, 2016
- Plan your Week Ahead: 7 Must Have Android Applications for the Week - October 23, 2016