Make anchor links consistently direct to a specific anchor?
-
Hi,
I’m trying to make anchor links work consistently on this page:
https://skoffices.sk/wp/Theme: twenty fourteen
The main page loads all my posts with anchor links linking to their respective headings. I have a menu on the left which takes the user to a specific post while remaining on the main page, which shows all the posts.
Let’s say I click on “Westend Square” in the menu at the top left. I am redirected to a section of the main page that talks about Westend Square. This is exactly what I wanted.
However, if I click on “Westend Square” in the menu at the top left one more time, I am still redirected to “Westend Square”, but directly below the title of the respective post.
This is bad. How can I make the link redirect to the way it was on the first time I clicked on it – even upon clicking on it again?
Also, another more important issue:
Let’s say I click on “Sloven?ina” somewhere on the page. I am redirected to a Slovak version of the posts page (I use WPML for translations), which is good. However, I am either redirected below the title (in the case of Westend Tower) or somewhere to the middle of the respective post (which is bad).
What I need is to have the anchor links set in such a way that when I click on “Sloven?ina”, I am taken to that post with the title of that post at the top of the page. How can I go about doing this?
Thanks in advance,
Juraj
- The topic ‘Make anchor links consistently direct to a specific anchor?’ is closed to new replies.