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

    Hi kriesi,

    on my dev page i use a svg logo as an image- and my question is how can i use the logo with a svg code instead of svg image, i tried to put it in the -> function-set-avia-fronted.php but it don´t work

    have you and idee where i have to put it?
    thank you

    #716766

    Hey siteraum,

    1. Please install this plugin https://wordpress.org/plugins/svg-support/
    2. Upload your svg file to media library
    3. Browse the svg file or just insert the URL to the svg file in the logo upload options.

    Let us know if you need any help :)

    Best regards,
    Vinay

    #716916

    hi vinay, thank yo for answer,

    but i want to replace my svg logo image with the svg code, and with this plugin i cant load the svg code for the logo, where i have to put the svg code? sorry about this…

    #716992

    Hey!

    You will need to remake the function of the logo, change the logo placment and add the SVG.
    https://kriesi.at/support/topic/replace-default-logo-with-text-or-remove-it-completely/

    here is an example of the function.

    Thanks a lot

    Regards,
    Basilis

    #716995

    Hi basilis, thank you for answer,
    this thread i read before but it dont works- perhaps i am not so fit for it

    i dont know how too put the svg code inside- when you have time please help me to figured it out- thany you basillis
    see privat link

    #718290

    Hi,

    put the first code inside your functions.php and the try for the second one to use a Code Block element of it (inside of Content Elements in ALB).

    Best regards,
    Andy

    #718314

    Hi andy,
    thank you for answer.
    Sorry but i don’t understand- you say that have to use a code block in the ALB element?

    i want to replace the logo (is an svg images) with the svg code of the logo… I

    Thank you
    perhaps i write in german- my english is not so good

    #718318

    Hi!

    Please add the code in private content field into Functions.php file in Appearance > Editor and then add following code to Quick CSS in Enfold theme options under General Styling tab

    .logo > a > img { display: none !important; }

    Cheers!
    Yigit

    • This reply was modified 7 years, 11 months ago by Yigit.
    #718327

    thank you very much yigit- it works!!!

    thank you!! super!!

    #718329

    thank you thank you- i spend days with that!!!

    #718337

    yes the code is important to set the logo to display: none (ps don’t forget to make it for the responsive case too.)

    but you don’t need any plugin for that.
    The code to be able to upload svgs to wordpress is old:

    (both comes to child-theme functions.php)

    function custom_mtypes( $m ){
        $m['svg'] = 'image/svg+xml';
        $m['svgz'] = 'image/svg+xml';
        return $m;
    }
    add_filter( 'upload_mimes', 'custom_mtypes' );

    after you set the original “logo” to display none you can insert the svg code (so without img src) into enfold:

    function first_logo($logo) {
    $logo .= '<strong class="logo first-logo"><a href="path to an url1">' ;
    $logo .= file_get_contents("/wp-content/uploads/logo1.svg");
    $logo .= '</a></strong>';
    return $logo;
    }
    add_filter('avf_logo_final_output', 'first_logo');

    this is a big andvantage because now you have the possibility to setup f.e. hover styles to svg path or something like that.

    • This reply was modified 7 years, 11 months ago by Guenni007.
    #718349

    Hey!

    You are welcome!

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)


    @guenni007
    Thanks for your help :)

    Regards,
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘SVG code for Logo’ is closed to new replies.