Skip to:

Disable scroll top

  • Debora1976



    I really would like to know how I can prevent scroll top of page when I click on a menu item on the members profile page.
    Now every time I click a button the page scrolls to the top and I have to scroll back.

    And I also would like to know when I edit the profile or profile image and click save, how I can redirect to the profile, so I can see the changes immediately.

    Hope you can help me.

    Kind regards,

Viewing 3 replies - 1 through 3 (of 3 total)

  • Venutius


    Hi there, WordPress and BuddyPress are predominately PHP applications. PHP requires a page load in order to view new content and this is what you are seeing – you click a menu item a new page loads and it starts from the top of the page again. There are tricks to bring the page focus back to where you were and BP uses these where appropriate, another trick is to use Javescript to fetch now content and again BP uses this, in the activity page for example. But when you are clicking a main link, an entire now page is going to be loaded to there’s not a reference of where you were in order to set the new page focus. So in short, it’s the way WordPress and BuddyPress have been written, yu’d need to do a significant rewrite to change it.



    Oké, I see.
    Could it be something like in this example?

    function gototab(reload)
    window.location.hash = ‘#tab2’;

    open tab 2



    Yep the situation has improved with Nouveau and maybe Gutenberg will have something to say about how we structure our pages in future?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar