Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #663416

    Hello,

    Is it possible to change te url only on the homepage on the logo element?

    I’ve seen this post:
    https://kriesi.at/support/topic/changing-the-header-logo-link/#post-661402

    But that’s for all the pages. Maybe put the functions in a code block on the homepage?

    The reason I’m asking is because I want to but a button on the same place as the logo in stead of the logo.
    Maybe there is an other possibility, for example placing a custom block on the same place as the logo?

    Greets Jeen

    #663556

    Hey Jeen,

    Thanks for getting in touch with us!

    Please try adding the following code to you functions.php file:

    add_filter('avf_logo_link','av_change_logo_link');
    function av_change_logo_link($link)
    {
        if(is_page(59)){
        $link = "http://kriesi.at";
        }
        return $link;
    }

    Note that you need to change the ’59’ to the page id of your homepage.

    Best regards,
    Jordan

    #666652

    Hello Jordan,

    Thanks for the quick response. I’ve missed your email so that’s why I haven’t reached back to you.
    Code works perfect. Thank you! Is it also possible to add a target=”_blank” to the URL?

    Greets Jeen

    #666654

    Hey!

    Please add following code to Functions.php file as well

    function logo_attr(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('.logo a').attr('target','_blank');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'logo_attr');

    Cheers!
    Yigit

    #666664

    Hello Yigit.

    Is it also possible to do this on a page? So only homepage target=”_blank”?

    Gr. Jeen

    #666682

    Hey!

    Yes, please change the code to following one

    function logo_attr(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('.home .logo a').attr('target','_blank');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'logo_attr');

    Best regards,
    Yigit

    #666808

    Yigit! You’re a boss! Thanks. Everything works perfect!

    Gr. Jeen

    #667142

    Hi,

    Glad we could help! We really appreciate it if you rate our theme on themeforest .
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Change logo url only on homepage / or please custom block in header’ is closed to new replies.