• Resolved sky13lade

    (@sky13lade)


    Hi, love the idea of this but cannot get it to work.

    First, not sure how to export .svg from Illustrator.
    There are several options and I don’t know what combination is needed to work with this plugin.

    Second, after I add the .svg to the Media Library in WP, when I go to load it as my Site Identity Logo, after selecting it, it puts me on the crop page and I’m unable to do anything. Not sure what I’m doing wrong.

    WP 4.7.5
    Storefront (child theme) 2.2.3

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there,

    To export from illustrator, you can literally just hit save as and choose SVG and it should work fine.

    You need to add some code to your theme to bypass the crop part.
    This article should help you with the skipping the crop screen.

    Let me know how you go.

    Cheers
    Ben

    Thread Starter sky13lade

    (@sky13lade)

    Hey Ben,
    Very appreciative of your help!

    Yeah, THAT article. ??
    I tried using that before as well as a few others and could never get anything to work correctly.

    I gave it a go again just now to no avail.
    One misgiving about the article you pointed to is that it isn’t clear WHERE the code goes (or i’m totally missing something).

    I am using a child-theme.
    I have a functions.php and a header.php.
    I’ve tried both with no luck.

    So, now looking at the WP codex that the article links to, I see that it clarifies that the code gets placed in functions.php.
    It also shows additional code to place in header.php

    Still not getting it to work.
    I’m at a loss.

    Plugin Author Benbodhi

    (@benbodhi)

    I can take a quick look tomorrow if you’d like. If so, shoot temp admin login details to [email protected] and I’ll see what I can do ??

    Plugin Author Benbodhi

    (@benbodhi)

    Ok,

    I have found a number of issues and fixed them all.

    Firstly, your host was not allowing rendering of SVG files, it shows them as plain text. The fix for this is to add the following line to your .htaccess file in the root of your website (right before the WordPress section):
    AddType image/svg+xml .svg .svgz

    Second, the theme did not support SVG flex-width / flex-height for the logo, so I added the theme support for that (and deleted your existing one for header as it is not needed in this case):

    add_action( 'after_setup_theme', 'navmodvispro_theme_support', 11 );
    function navmodvispro_theme_support() {
    
    	remove_theme_support( 'custom-logo' );
    
    	add_theme_support( 'custom-logo', array(
    		'flex-width'  => true,
    		'flex-height' => true,
    	) );
    
    }

    Third, your stylesheet needed a little addition to make sure the SVG logo was not displayed at 0px width, so I added:

    .site-header .site-branding img {
        width: 100%;
    }

    So now your media library will show SVG like normal images and you can use SVG in your site identity section of the customizer.

    ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Customizer wants me to crop image’ is closed to new replies.