Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1189778

    Hello,
    I was wondering if you had some input on how to replace the default site logo image by a nanimated json exported from after effects via bodymovin ?
    That would be a great way to add an animated logo to my site.
    Thanks a lot for your help!

    Max

    • This topic was modified 4 years, 8 months ago by maxgorelkine.
    #1190078

    Hey maxgorelkine,

    Maybe it can be done as the svg logo, here is how

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1190084

    Hello Victoria, thanks for your reply.
    Yes I know about the possibility of using an svg file as a logo, and has been using it regularly :) And there are ways to export an animation as an animated svg, but it’s not very easy to do…
    For a couple of years thought, bodymovin has become the best and simplest way to export after effects animations for the web. Unfortunately, it is exported as a json file, not an svg.

    There is a wordpress plugin allowing to insert a bodymoving json animation as a shortcode.

    So maybe the solution would be to replace the logo default image by a shortcode… by I have no idea how :))
    Do you know the best way to achieve that ?

    Thanks a lot!

    • This reply was modified 4 years, 8 months ago by maxgorelkine.
    #1190198

    Hi maxgorelkine,

    One way this can be done is by editing the header.php file or actually the /enfold/includes/helper-main-menu.php file to remove the logo and add the necessary code there.

    Best regards,
    Victoria

    #1191870

    Thank you for your reply. Is there a way to use a shortcode instead of an image for the preloader ?
    I’ve copied this code from the functions-enfold.php file to my child theme functions.php

    /* wrap embeds into a proportion containing div */
    if(!function_exists('avia_preload_screen'))
    {
    	function avia_preload_screen()
    	{
    		$class = avia_get_option('preloader_transitions') != "disabled" ? 'av-transition-enabled' : "";
    		$label = __('Loading','avia_framework');
    		$logo  = avia_get_option('preloader_logo');
    		if( is_numeric( $logo ) )
    		{ 
    			$logo = wp_get_attachment_image_src( $logo, 'full' ); 
    			$logo = is_array( $logo ) ? $logo[0] : ''; 
    		}
    		
    		if( $logo ) 
    		{
    			$class .= " av-transition-with-logo";
    			$logo = "<img class='av-preloading-logo' src='{$logo}' alt='{$label}' title='{$label}' />";
    		}
    		
    		$output  = "";
    		$output .= 	"<div class='av-siteloader-wrap {$class}'>";
    		$output .= 		"<div class='av-siteloader-inner'>";
    		$output .= 			"<div class='av-siteloader-cell'>";
    		$output .= 			$logo;
    		$output .= 			"<div class='av-siteloader'><div class='av-siteloader-extra'></div>";
    		$output .= 			"</div>";
    		$output .= 		"</div>";
    		$output .= 	"</div>";
    		$output .= "</div>";
    		
    		return $output;
    	}
    }

    I’m trying to replace the image with <?php echo do_shortcode(‘[bodymovin anim_id=”18″ loop=”true” width=”300px” height=”300px” align=”center”]’); ?>

    But it doesn’t seem to work…
    Can you help ?

    Thanks a lot!

    #1192037

    Hi maxgorelkine,

    Do you mean you want to show that instead of the preloader? Not the logo in the header?

    Best regards,
    Victoria

    #1192059

    Yes exactly! To be more precise, I would like to show it instead of the logo used on the preloder overlay.

    #1192311

    Hi,

    I am not sure if this is going to work with your shortcode but could you please try adding following code to bottom of Functions.php file in Appearance > Editor

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        $logo = do_shortcode( '[bodymovin anim_id="18" loop="true" width="300px" height="300px" align="center"]' );
        return $logo;
    }

    Best regards,
    Yigit

    • This reply was modified 4 years, 8 months ago by Yigit.
    #1192317

    Thank you very much, unfortunately it breaks the site… perhaps there is a syntaxe pb ?

    #1192318

    Hi,

    I noticed syntax error and fixed my code. Could you please try updated code?

    Best regards,
    Yigit

    #1192323

    Unfortunately, it still breaks the site…

    #1192737

    Hi maxgorelkine ,

    Can you please check the server log for error?

    Best regards,
    Victoria

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.