Link to current page html

Have been searching some topics but don’t think I have found the exact answer I was looking for hence I try here. In my WordPress website I have a hardcoded button on around 150 pages on each top of a page. I would like to link to an angor text /#anchor halfway of each of this pages.

Now I don’t want to enter every specific URL manually. Is there a HTML trick where you refer to the current URL, something in the order of: .com/currentpage/#anchor?

Read More

Thanks in advance for any help or tips.

Related posts

1 comment

  1. You can add a link on current page without add a page url.

    For hash

    <a href="#currentPageLink">Link</a>
    

    For QueryString

    <a href="?currentpagelink=true">Link</a>
    

Comments are closed.