Jaakko Uusitalo
Jaakko Uusitalo

Reputation: 705

Wordpress one pager anchors and single pages

I'm using this theme called Tharsis (one pager). I have little problem between anchors and single pages.

Currently I have 5 links in navigation bar, they are "Palvelut", "Referenssit", "Historia", "Blog", "Ota Yhteyttä". First 3 and last one uses anchors (ex. #palvelut), blog is category.

When I click "Blog" category link from navigation bar, url changes to "site.com/category/blog/."

Now if I click "Palvelut" link then url changes to "site.com/category/blog/#palvelut and that does not take me anywhere.

Here is website I've been working on: http://www.parannapalvelua.fi

Upvotes: 0

Views: 120

Answers (2)

yahya akhtar
yahya akhtar

Reputation: 239

if you are using WordPress menus in that primary menus check out the "Palvelut" and set out the link which you want. enter image description here

or if you are using html anchor tad then use like this

<a href="<?php echo site_url(); ?>/{your path}">Palvelut</a>

Upvotes: 2

versvs
versvs

Reputation: 643

You should put the whole URL in the menu link, followed by the anchor.

Otherwise the link tag interprets always the window active URL as the destination URL, and tries to find an anchor within the current document, which in your case leaves everything unchanged as the active url /blog doesnt contain the anchor you are looking for.

Upvotes: 0

Related Questions