Skip to:
Content
Pages
Categories
Search
Top
Bottom

Stop page going to top when menu item is clicked(activity/profile/messages etc?)

  • @mcpeanut

    Participant

    hi all, due to the picture in my header being very big and ending 450px down the page, you have to scroll down to access the buddypress menu in the relevant page (the one above activity stream etc) which is exactly where i want it, removing my header is not an option, now the only problem i am having is that when i click from activity to profile to message to friends etc…each time i click one of them my page reloads but takes me back to the top of my website….i need the page to stay at the same point so that the menus can be flicked through without having to scroll down to it again everytime a link is pressed. how do i achieve this? can you please help me sort this out….i have no problems adding or editing codes if i know what code needs changing and what to add to make it do this. thx

Viewing 8 replies - 1 through 8 (of 8 total)
  • @henrywright-1

    Member

    The way to do it would be to put an id of “top” on the HTML element directly under the header image. So something like this

    <!-- end header -- >
    <div id="top">...</div>

    Then append all of your links with #top

    @mcpeanut

    Participant

    ok so let me get this straight i would locate where my header is in my themes style.css add this line underneath.
    <!– end header — >
    <div id=”top”>…</div>

    then add the #top to all the links that i want to jump to under my header?

    if so where do i find the links to add the #top ..where are the links located in buddypress to the activity/profile/messages tabs? i can see them if i use firebug but cannot locate them ..what file in buddypress will the be in?

    example if i look in firebug at the messages tab i can see that it is
    href=”http://www.mysite.com/connect/members/username/messages/”&gt;
    but i dont know where buddypress stores this as ive looked through a few files and cannot find it and how would i amend this with #top once found? could you give an example please.

    thats all i need to know its probably staring me in the face but i just cant see it 🙂

    @mcpeanut

    Participant

    sorry the link would look like this

    a id=”user-messages” href=”http://www.mysite.com/connect/members/username/messages/”&gt;

    @henrywright-1

    Member

    Your header HTML wouldn’t be in style.css. It would be in your theme’s header.php.

    Links are everywhere. You’d basically be looking for every inbound link (which would be a huge undertaking). You may be able to do something in .htaccess but that seems overkill

    Perhaps someone else knows of an easier approach?

    @mcpeanut

    Participant

    i meant to say header .php lol i dunno what i was typing style.css for haha its because im changing some styling in my style.css as we speak lol

    yes this is what i was saying theres only the buddypress menu links i want to do this function so no need to hunt for all my other links….surely someone must know where these links are located in buddypress…what file? i only need to add the #top to the activity/profile/messages/friends/groups/settings/personal/mentions/favourites etc in the buddypress menu itself.

    @henrywright-1

    Member

    My solution was to hide the header image on all areas of the site except the homepage.

    Maybe that would help you?

    @modemlooper

    Moderator

    Header images an every page only satisfies the designer of a site and does nothing for a site user. for usability sake remove it or create and trimmed down header image for user pages.

    @mcpeanut

    Participant

    i cant do this as mentioned above…my header is a unique feature of all the pages…..ive integrated the main nav bar for my website into the header so it looks like part of the header….basically my site has 2 seperate content area one for the buddypress side of things and one for the orther pages if i remove the header i destroy the whole look of my theme as this section is crucial for navigation to the other areas…i refuse to believe that someone on these forums that have been using buddypress for years dont know where i would find where the links to the activity/profile/messages/ can be changed…i only need to locate these links in buddypress really to point them to under the header as henry said above (if it works) …surely someone knows how i can do this….im new to the buddypress plugin and nthis is why i need help to do this…basiclly its only location of where the links are in budypress files so i can edit them that i really need help with.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Stop page going to top when menu item is clicked(activity/profile/messages etc?)’ is closed to new replies.
Skip to toolbar