Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Site Functionality _ Wordpress shortcut not working

Posted by: Erik Emanuelli Jul 6 2021, 09:01 AM

Hello everyone,
I don't know if the title is correct.

My issue is the following.

In this post:
https://erikemanuelli.com/on-page-seo/

if I click on the menu links within the post, example:
https://erikemanuelli.com/on-page-seo/#onpageseo

the reading jumps directly to that part of the article.

It's not happening here:
https://erikemanuelli.com/link-building/#linkquality

Is something incorrect in the HTML, or code, or anything else that you can see?

I really, really appreciate the help.
Thanks,
Erik

Posted by: pandy Jul 6 2021, 11:50 AM

You've screwed up the link target IDs and included a hash sign in them.

CODE
<h2 id="#linkbuildingconcepts">


The hash only goes in the link to the target, not in the target name. The hash is what tells the browser it's dealing with a fragment identifier, i.e. that it should go look for "some_name" as the value of a name or id attribute in the same page. It won't find "#some_name".

Posted by: Erik Emanuelli Jul 7 2021, 06:53 AM

QUOTE(pandy @ Jul 6 2021, 11:50 AM) *

You've screwed up the link target IDs and included a hash sign in them.

CODE
<h2 id="#linkbuildingconcepts">


The hash only goes in the link to the target, not in the target name. The hash is what tells the browser it's dealing with a fragment identifier, i.e. that it should go look for "some_name" as the value of a name or id attribute in the same page. It won't find "#some_name".


Thanks for taking the time to check the issue, Pandy.
I'm fixing it right now. biggrin.gif

Posted by: pandy Jul 7 2021, 07:37 AM

👍

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)