Anchor links not working right in word press

Posted on 2015-02-23
Medium Priority
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...
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?


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 2000 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Who says nothing in life is free? WordPress.com is a freebie. WordPress.org's downloadable publishing platform is free. Heck, even WordPressMU is free. WordPress is an open source project, which means it can be used on any personal or commerc…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
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…
Suggested Courses

764 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