WordPress stripping out HTML

In WordPress I'm wanting to create links to jump down the page. So at the top I have something like:-

<a href="#a-blessing-for-a-poet">A Blessing For A Poet</a>
<a href="#the-bore">The Bore</a>
<a href="#rock-and-roll">Rock And Roll</a>

Then further down I have lines like:-

<a id="rock-and-roll">&nbsp;</a>

<a href="http://charliem.poetrybooks.org/rock-and-roll/">Rock And Roll</a>

[audio mp3="http://www.yarnwhispering.co.uk/wp-content/uploads/2018/03/Rock-And-Roll.mp3" ogg="http://www.yarnwhispering.co.uk/wp-content/uploads/2018/03/Rock-And-Roll.ogg"][/audio]

Why is this happening?

The problems is that this saves fine but if I save and switch to the "Visual" tag and view the draft it's fine. However if I go back and swith back to "Text" view WP has stipped out the link and I just have:-

&nbsp;

<a href="http://charliem.poetrybooks.org/rock-and-roll/">Rock And Roll</a>
LVL 1
cescentmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin MillerCTOCommented:
Yes, Wordpress does strip out format tags, etc, that don’t conform to their theme-model. You can extend customization outside of the theme-model, but, you may have issues with future updates.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cescentmanAuthor Commented:
Can I get round this by using a child theme? If so where do I look for a solution?
0
Martin MillerCTOCommented:
You can get around this but, you need to modify a bit of PHP code, and also accept you're not going to be able to update easily. PHP code in both the Theme and the Core will need to be modified.
0
cescentmanAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.