Okay
  Public Ticket #964425
Header Image Link
Closed

Comments

  •  2
    Cauhe started the conversation

    Hi!

    When I click my header image, it loads my site: www.tectoarquitetura.com.br

    I would like to change this. When I click in the header image, go to www.tectoarquitetura.com.br/#home

    How can I change that?


  •  3,030
    Andrew replied

    Hi Cauhe, 

    Thanks for reaching out to us. 

    You'll have to edit the theme files to make that change. Head to salient\header.php on line 150 you should see this code: 

    <a id="logo" href="<?php echo home_url(); ?>" <?php echo $logo_class; ?>>
    

    You are going want to change it to something like this: 

    <a id="logo" href="<?php echo home_url()"."/#home"."; ?>" <?php echo $logo_class; ?>>
    

    Let me know the result. 

    Cheers 

  •  2
    Cauhe replied

    Hi Andrew!

    Thanks for your reply!  I just did, and it worked in part. 

    When I click the header image now it is going to the top of the page, but not the way I would like. there is no ''going UP'' effect (I am making a One Page Site).

    I would like to have the exactly same effect when you click in the header image and when you click in the first Menu Item I created (.).

    I will gave you the access to my site (it is under construction)

    Tks!

  •   Cauhe replied privately
  •  3,030
    Andrew replied

    Hi 

    About having the header image click smooth scroll, please use the following JS:

    jQuery(function() {
      jQuery('a#logo').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
          var target = jQuery(this.hash);
          target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
          if (target.length) {
            jQuery('html, body').animate({
              scrollTop: target.offset().top
            }, 1000);
            return false;
          }
        }
      });
    });
    

    add it to salient \ js \ init.js at the very bottom.

    Cheers.