Anchor links not working right in word press

Posted on 2015-02-23
Last Modified: 2015-02-23
Why are my anchor links not going to the question?  Rather, they are going to the answer.  I would like when someone clicks on the question, that it jumps them lower down the page and that the question is repeated with the answer.  It works fine in html.  Here is beta page link
Question by:nsitedesigns
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40625888
We can't use a preview link to view stuff (we would have to be logged in to do that).  Are you doing this from preview or published states?

Author Comment

ID: 40625910
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40626101
Yes, and the internal anchors appear to be working fine for me...
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users


Author Comment

ID: 40626149
For me it goes to the answer and not to the question.   For example, when I click on Are Vinyl Windows Green link at the top of the page,  it jumps down page to the ANSWEr beginning with, "Vinyl is a superior pr.."  Ideally, I would like it to jump down to the place where the QUESTION is referenced again.

This screen shot shows (green arrow) where I would like it to jump visitor too.  The red arrow shows where it actually goes to.  I am using ff on a mac.
LVL 70

Accepted Solution

Jason C. Levine earned 500 total points
ID: 40626546
Again, it's working fine for me.  I jump to the question header in FF for Windows.  

The one thing you may want to try is wrapping the text with the <a>:

Do this:
<h3><a id="w-green">Are vinyl windows green?</a></h3>

Open in new window

Not this:
<h3><a id="w-green"></a>Are vinyl windows green?</h3>

Open in new window

Correct jump
Also, shouldn't it be <a name="whatever"> and not <a id="whatever">?

Author Comment

ID: 40626586
I set it up the same way Dreamweaver CS 6 does anchor tags.  I checked link in Chrome and it works there.  Must be a funky ff in mac thing.

Author Closing Comment

ID: 40626591
i'll give you points for your effort in trying to help even though your suggestions made no difference in how it worked in ff on mac.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question