Forums

Theme Rotator (5 posts)

  1. draver
    Member
    Posted 3 years ago #

    Hello. I'm searching for a theme rotator. I have two themes on my blog (night theme/day theme) but i can't find a suitable method to automaticaly switch them. If anyone worked with such a plugin or anything else, please help me.
    Thanks

  2. MichaelH
    Volunteer
    Posted 3 years ago #

  3. draver
    Member
    Posted 3 years ago #

    I need a plugin to do this job automatically. For example, at 20:00, the night theme will appear in front of default theme (day theme).

  4. draver
    Member
    Posted 3 years ago #

    No plugin found, so i used a php script. If you want a theme during the day and another theme during the night, paste this code in the header.php in head section after <title> tag

    <?php
    $hour = date('G');
    
    if (($hour < 8) or ($hour >17)) {
    $css = 'style_night.css';
    } elseif ($hour > 8) {
    $css = 'style_day.css';
    }
    
    echo '<link rel="stylesheet" href="/wp-content/themes/default/'.$css.'"type="text/css" media="screen, projection"/>';
    
    ?>

    This script is using the time from server. If you have some question, just ask.

  5. draver
    Member
    Posted 2 years ago #

    Another solution for theme rotator is the Day Switcher plugin.
    http://blog.thomascook.fr/demo/en/day-switcher/

Topic Closed

This topic has been closed to new replies.

About this Topic