This was the solution to my problem:
Then what I would do is to store the clicked anchor in a cookie using javascript and read it while loading the new page. $_SERVER[‘HTTP_REFERER’] won’t be reliable here. – Luis Sanz Jul 19 at 12:33
Related Posts:
- Retrieving a list of menu items in an array
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- Custom Post Types posts as submenus in Nav Menu
- Filter out built-in wp_nav_menu classes but keep custom class
- How to get a different mobile menu than desktop menu in the twentytwelve child theme
- HTML Bootstrap navigation menu to WordPress menu using wp_nav_menu
- Getting URL value from menu item by ID
- Is it possible to add a filter for the output of nav-menu items in admin?
- Adding html elements to wp nav menu
- Bar separated navigation by extending Walker_Nav_Menu
- How to change menu according to the language?
- insert element inside wp menu list item
- WordPress Menu Disappears when $query->query_vars[‘meta_key’] is set
- how do I delete (not exclude) a menu item from navigation bar
- show only a given level in nav menu
- How to style current page menu item when using a walker
- Anchor only wp_nav_menu
- add_action for saving a custom menu
- Getting post content within wp_nav_walker
- Nav Walker current menu item not displaying
- Navigation (wp_nav_menu) refuses to nest within parent element
- Removing strip_tags not working on nav_menu_description
- Keeping ‘current-menu-item’ highlight of navigation menu?
- Hide Menu Unless Logged In
- Possible to add a dynamic link to a sub-menu via wp_nav_menu_items?
- Populating main menu from external JSON API
- HTML in Menu Items disappear on save
- Fragment URL in navigation item without a custom link
- How to put a Menu on the left side of a particular page in WordPress 3.5
- How to change theme header to support multiple nav menus?
- Unable to create or edit menus
- How do you cope with the task of adding hierarchy to the navigation menu?
- wp-admin is blocking my mobile menu icon [closed]
- Filtering Only a Specific Menu using the “add_additional_class_in_li”?
- Displaying primary nav menu two ways
- Why do menus break on site url and folder change?
- How to Implement Submenu Using wp_nav_menu
- Close dropdown menu on click or scroll outside the menu [closed]
- Restrict control in nav-menu for specific role
- walker – 0 level on submenu formatting
- Translate a word in a responsive menu
- current-menu-item class not working properly
- Is there no straightforward way to display a separate second level using wp_nav_menu()?
- Menu items suddenly are displayed all over the page [closed]
- Custom navigation structure with walker class
- Allowing HTML in Menu Descriptions
- How to add class to parent a tag with a sub menu
- CSS Classes (optional) on menu is not showing
- Listing Child Pages in a Certain Order?
- Why is only the first operation run in my loop – except for on the last repeat? [closed]
- Move Sticky Nav Menu Below WordPress Tool bar when tool bar enabled
- Prevent menu from loading in a page template [duplicate]
- WordPress + Bootstrap [closed]
- How to hide a menu from public, but share content with a private link [closed]
- Add custom link on the fly to nav menu
- WordPress menu>Custom Link: removing my link formatting and adding %20
- URL links consistent with menus?
- Strange menu behaviour wordpress admin [duplicate]
- Wp_list_pages not showing children with custom page template
- How to check if current page is a parent item or child item in a given menu
- changing the labels inside appearance -> menus for some for the fields
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- How to add active class to separate page link?
- Buggy wp_nav_menu?
- dropdown menu, with walker
- Add function to custom menu
- if role is logged in then do something
- WP Menu Rollover Nav Item and Effect DIV Elsewhere
- Custom menu with additional logic for display
- Menu item that hides when you click the previous submenu
- Putting footer links into different columns
- Add/remove image from navigation bar
- How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme
- adding drop down menu item to existing menu
- wordpress walker add class to submenu a href
- Display searchform in the menu
- Add href to tag in nav menu for mobile
- How to Hide/Remove Pages section in Menus (Dashboard)
- Unable to remove page from primary menu
- Show navigation header menu by post and categery
- wp-nav menu with custom walker , how to remove a tag if it has any submenu
- How to add a toggle on the left side of my page?
- How to add buddypress sub-menu items to other menus
- Custom location for menu
- Always show wordpress submenu on responsive header menu
- add custom entries to menu options
- Showing a link with Javascript based on log-in status
- Placing generated list into drop-down on custom menu
- Set menu item class into body
- Building Menus with the latest posts included
- Cannot control wp_nav_menu properly
- How to add drop down sub menu from database fields in the particular menu slug
- wordpress superfish dropdown menu
- Drop down menus css in custom menus
- Creating a custom menu
- List WordPress Custom Menu’s active parent level’s children as separate menu
- How to change the markup created by menu item only on chosen items?
- How to disable permalink of a particular menu item?
- How to change mobile menu (toggle) icon in WordPress – Full Site Editing?