Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // 1. Create file in your child theme: /wp-content/themes/asli-child/template-parts/preloader/preloader.php with the contents below.
- // 2. Put the correct URI to your loading gif to the <img> below.
- // 3. Enable theme's preloader in Elementor Site settings and adjust "Final Delay Before Displaying Page" under "Animation" tab as you need.
- $defaults = array(
- 'beforeLoadingText' => arts_get_kit_settings(
- 'preloader_before_loading_text',
- esc_html__( 'Loading...', 'asli' )
- ),
- 'afterLoadingText' => arts_get_kit_settings(
- 'preloader_after_loading_text',
- esc_html__( 'Filmmaker & Photographer', 'asli' )
- ),
- 'headingText' => arts_get_kit_settings(
- 'preloader_heading_text',
- esc_html__( 'Asli Wells', 'asli' )
- ),
- 'counterEnabled' => arts_get_kit_settings( 'preloader_counter_enabled', true ),
- 'slidingImagesEnabled' => arts_get_kit_settings( 'preloader_sliding_images_enabled', true ),
- 'slidingImages' => arts_get_kit_settings( 'preloader_sliding_images' ),
- 'slidingImagesSize' => arts_get_kit_settings( 'preloader_sliding_images_size', 'full' ),
- 'slidingImagesCustomDimension' => arts_get_kit_settings( 'preloader_sliding_images_custom_dimension', null ),
- );
- $args = wp_parse_args( $args, $defaults );
- $attributes = array(
- 'class' => array(
- 'section-fullheight',
- 'text-center',
- ),
- 'id' => 'page-preloader',
- );
- $attributes = arts_add_component_attributes(
- $attributes,
- array(
- 'name' => 'Preloader',
- 'hasAnimation' => true,
- )
- );
- ?>
- <div <?php arts_print_attributes( $attributes ); ?>>
- <div class="preloader__wrapper js-preloader__wrapper">
- <!-- Adjust "src" to the path to your image -->
- <img src="https://PATH_TO_YOUR.GIF" alt="" class="preloader__image">
- <?php // get_template_part( 'template-parts/preloader/partials/fast-sliding-images', null, $args ); ?>
- <?php // get_template_part( 'template-parts/preloader/partials/heading', null, $args ); ?>
- <?php // get_template_part( 'template-parts/preloader/partials/counter', null, $args ); ?>
- <?php // get_template_part( 'template-parts/preloader/partials/bottom-content', null, $args ); ?>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement