Hello Summer Sale!
Exclusive season-opening discount on TheGem theme.
Limited time offer.

Okay
  Public Ticket #1398771
scroll to top when click on icon
Closed

Comments

  • Andreas started the conversation

    Hello!

    Thank you for the plugin, it works great as a whole. 

    When I click the company icon on the top menu the page reloads. I'd like to have it scroll to top instead.

    For the rest of the page I'm using "Page scroll 2 ID"-plugin which works good. 

    Thankfull for your input. 

  •  7,280
    Oliver replied

    Hi, sorry, not quite sure what do you mean. Can you pls provide more details with screenshots?

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Andreas replied

    Ah, 

    So at the top left of the page in the navbar the company logo is located (Apologia). When that icon is pressed the page reloads and takes the user back to the top. 

    I would like to avoid the screen beeing reloaded and instead have the page scroll back to top when the logo in the navbar is pressed.

    The only difference beeing that the page is not reloaded. 

    Did that make more sense? 

  •  7,280
    Oliver replied

    Hi, you need to edit:

    /wp-content/themes/thegem/functions.php

    line  2109

    Change to:

    <a href="#page" class="scroll-to-anchor">
    

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Andreas replied

    Should I replace the current entry on line 2109?

    "

    $image->resize($width*$ratio, 0, false);

    "

  •  7,280
    Oliver replied

    Hi,

    you just need to change the line:

    <a href="<?php echo esc_url(home_url('/')); ?>" rel="home">
    

    to

    <a href="#page" class="scroll-to-anchor">

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Andreas replied

    Awesome! Works like a charm =)

    Thank you very much.

  •  7,280
    Oliver replied

    Welcome!

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver