Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1403682
    #1403727

    this link : https://kriesi.at/documentation/enfold/example-of-logo-left-menu-center-widget-right seem to be long time ago when there was no support for svg inline logo.

    Try to get rid of css that concerns to logo and logo img .
    First just get rid of the logo size setting:

    .responsive #top #header .logo,
    .responsive #top #header .logo a,
    .responsive #top #header .logo img {
        /*! width: auto; */
        /*! height: auto; */    
        align-items: center;
        align-self: center;
        justify-content: center;
    }

    inline svg needs absolute dimension settings – the auto will end in svg dimension 0px

    #1403728

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

    #1403732

    @Guenni007 True, but there is no code with SVG or IMG the a.av-contains-svg is completly empty!
    I know CSS, but the content of the SVG is not loading therefore if have made a screenshot of the code.

    • This reply was modified 1 year, 8 months ago by Tieme.
    #1403737

    Then we have to know more details – is Enfold Up to Date. What about WordPress Version.
    Or just post a link to your page – if not possible on public – use the private content area for the mods.

    Please pull your svg logo to a browser window – to see if it is rendered by a browser.

    #1403782

    @Guenni007 Everything is up to date, installation is 4 days old. only 4 plugins installed.

    If i use the filter “avf_logo” below the correct logo will be used. Also it will show up in the browser if i directly acces it.
    This is before it is going to set as a logo.

    
    Array
    (
        [$logo] => https://www.*.nl/2023/wp-content/uploads/logo-rood-2023.svg
        [option_set] => option_set
    )
    

    Here is the “avf_logo_final_output” data, as you can see here the SVG is nowhere to be found.

    
    Array
    (
        [$logo] => <span class='logo avia-svg-logo'><a href='https://www.**.nl/2023/' class='av-contains-svg'></a></span>
        [$use_image] => https://www.**.nl/2023/wp-content/themes/enfold/images/layout/logo.png
        [$headline_type] => span
        [$sub] => 
        [$alt] => **
        [$link] => https://www.**.nl/2023/
        [$title] => logo-rood-2023
    )
    

    So somewhere in following code it goes wrong Github / function (Not my github repo)

    • This reply was modified 1 year, 8 months ago by Tieme.
    #1403786

    do not use these filters for that – just load your svg logo by enfold options dialog.
    All newer Enfold will suport the inline svg logo now. And on transparency the same

    See comment on bottom right “Since 4.8.6.4 … )

    These filters can be used to show on specific pages a different logo. But for svg there might be better ways then.

    f.e.: to replace a standard jpg/png logo with inline svg on specific pages:

    function replace_logo_with_svg() {
    if(is_page(array( 39718, 39906))){ 	
    ?>
      <script type="text/javascript">
      (function($) {
        function a() {
          $( ".logo a img" ).remove();
          $.get('/wp-content/uploads/logo-rood-2023.svg', function(svg){
            $( ".logo a" ).html( svg );
          }, 'text');
        }
        a();
      })(jQuery);
      </script>
    <?php
    }
    }
    add_action('wp_footer', 'replace_logo_with_svg');

    see here a different logo – than on the other pages: https://webers-testseite.de/portfolio/

    #1403793

    I think i found the problem.
    If i use any other SVG it works, so my SVG is probably not reading oke for the aviaSVGImages class.

    #1403796

    Hi,

    Thanks for the update, please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

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