Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Splash Screen

Discussion in 'Troubleshooting & How-To's' started by rajanpandit, Sep 5, 2014.

  1. rajanpandit

    New Member

    Joined:
    Aug 12, 2014
    Messages:
    5
    Likes Received:
    0
    I have developing a wordpress 3.9.1. website.. I want a splash screen in fading animation for my website.. when browser load my website user can see that slash screen and after completing the loading... webpage will be display.. this system I want for my all pages and post... please help.......
     
    #1
  2. TIEro

    New Member

    Joined:
    Jul 9, 2014
    Messages:
    29
    Likes Received:
    1
    First off, do you REALLY want it to appear before every single post and page or do you mean you want the fading animation splash to be your front page? Having it constantly appear on every page is going to get very annoying, very quickly.

    Assuming you want it as a custom front page, you just need to add a "front-page.php" page template to your theme directory. Make sure you keep a copy of it, as it will disappear when you update the theme (unless you create a child theme and all that). The front-page.php will be picked up by WP automatically instead of the normal front page (recent posts or whatever).

    Hope it helps.
     
    #2
  3. rajanpandit

    New Member

    Joined:
    Aug 12, 2014
    Messages:
    5
    Likes Received:
    0
    #3
  4. TIEro

    New Member

    Joined:
    Jul 9, 2014
    Messages:
    29
    Likes Received:
    1
    No.

    The only way you can do that is by adding a script to your header.php that calls whatever code creates the splash page, much as ad code calls an ad script, etc. If you do this, you will have a VERY high bounce rate - i.e. no one will stay, because that will be incredibly annoying.
     
    #4
  5. TIEro

    New Member

    Joined:
    Jul 9, 2014
    Messages:
    29
    Likes Received:
    1
    No.

    The way you can do that is by adding a script to your header.php that calls whatever code creates the splash page, much as ad code calls an ad script, etc. If you do this, you will have a VERY high bounce rate - i.e. no one will stay, because that will be incredibly annoying.
     
    #5
  6. rajanpandit

    New Member

    Joined:
    Aug 12, 2014
    Messages:
    5
    Likes Received:
    0
    Thanks for reply....
    The following code is working... but it work only in wordpress admin not in website... what changes I have to made to make it possible to run in my website.... I simply add the following function to my funtion.php and it works in wordpress admin area....
    please reply....


    add_action( 'admin_head', 'dashboard_preloader' );

    function dashboard_preloader()

    {

    ?>

    <script type="text/javascript">

    jQuery(document).ready(function() {

    jQuery('body').css('overflow', 'hidden');

    });

    jQuery(window).load(function() { // makes sure the whole site is loaded

    jQuery('#status').fadeOut(); // will first fade out the loading animation

    jQuery('#preloader').fadeOut('slow'); // will fade out the white DIV that covers the website.

    jQuery('body').delay(350).css({'overflow':'visible'});

    });

    </script>

    <div style="top: 0px; bottom: 0px; position: fixed; left: 0px; right: 0px; background-color: rgb(255, 255, 255); z-index: 9999;" id="preloader">

    <div id="status" style="width: 200px; height: 200px; position: absolute; z-index: 9999; background-position: center center; margin: 100px 0px 0px -100px; background-image: url('tinkybell.fi/theme/Tinkybell/images/preloader.gif'); background-repeat: no-repeat; left: 50%; top: 100px;">&nbsp;</div>

    </div>

    <?php

    }
     
    #6

Share This Page

Web Hosting