Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1356695

    Hi, is it possible to insert the preload logo only on the homepage of the site (not on all pages)?

    #1356721

    if you mean that rotating preloader you can try this in your quick css:

    .home .av-siteloader {
        border: none !important;
        content: url(/wp-content/uploads/alternative-image.png);   /***  might be a svg file too ***/
        width: 150px;
        height: 150px;
    }

    if you are referring to the logo above the rotating image:

    .home .av-preloading-logo {
        content: url(/wp-content/uploads/alternative-image.png); 
        width: 450px;
    }

    dimensions you had to test yourself.

    #1356913

    Hi Guenni007! Thanks..
    however the preloading is seen every time I change the page of the site … I would like it to be seen only in the loading phase of the home page …

    #1356922

    ok – now i understand BUT
    even if you could load the script and styles only for home page:

    function front_page_preloader_script() {
        if( is_front_page() || is_home() ){
            wp_enqueue_script( 'avia-siteloader-js', get_template_directory_uri().'/js/avia-snippet-site-preloader.js', array('avia-default'), $vn, true, false);
            wp_enqueue_style( 'avia-siteloader', get_template_directory_uri().'/css/avia-snippet-site-preloader.css', array('avia-layout'), $vn, 'screen', false);
        }
    }
    add_action( 'wp_enqueue_scripts', 'front_page_preloader_script' );

    in functions-enfold.php there is still that line 20:

    $class = avia_get_option( 'preloader_transitions' ) != 'disabled' ? 'av-transition-enabled' : '';
    

    because it is in a Pluggable Function ( avia_preload_screen ) we could change that in child-theme functions.php.
    and we had to change some entries in header.php
    but even if we could do that – the preloader will also be shown if you leave the home page …

    _________________________

    So my quick and dirty way is:
    Set in Enfold Options the Preloader and do this to quick css:

    #top:not(.home) .av-siteloader-wrap {
        display: none !important
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.