Anchor Points only on post pages
I have been researching anchor points, and how to make the page automatically scroll down to a given point on the page. Although, I am having some troubles.
On each page, the URL ends with #video. And on every page that has a wordpress post, it automatically scrolls down to where I want it to. But, I only want the url to contain #video if it is a post page (not the index, about us, etc)
I found this thread:
And so my header contains:
Basically, I only want it to “onload=”goToAnchor();” if the page is a page with a post on it. How would I go about doing this?
- The topic ‘Anchor Points only on post pages’ is closed to new replies.