Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Header links stop working with paragraph text WordPress


So this is a weird one. On a website I'm maintaining, any link that is formatted as a header - 1, 2, 3, 4 and so on - will work as expected and be a link as well as a header. EXCEPT if you add any paragraph text to the page, at which point the links will flat out stop working. You can look at this page as an example:

If anyone knows what might be causing this behavior, I'd love to make header-formatted links in regular body text continue to behave as links.


Answers (4)


Luis Abarca answers:

Try to add this at the end of your stylesheet

.shortcodes h4 {
float: none !important;


Bob answers:

In your theme files there is css named "shortcodes.css"

It has following css at line no 130.

.shortcodes p{
margin: 0px 0 10px!important;
display: block;
width: auto;
float: none;

just add one element clear:both in it
so new code will be

.shortcodes p{
margin: 0px 0 10px!important;
display: block;
width: auto;
float: none;

<strong>Or </strong>

you can edit as <strong>Luis Abarca</strong> suggested at line no 64
Change float:left to float:none

new code will be

.shortcodes h4 {
float: none;
width: 100%;
margin-bottom: 15px;
color: #6D5754;
font-size: 32px;
font-family: 'Crete Round', serif;
line-height: 39px;

If you want to apply it for other than h4 also then
Please note you have to make changes for
.shortcodes h1, .shortcodes h2, .shortcodes h3 so on......

you can add code at the end of css like

.shortcodes h1,
.shortcodes h2,
.shortcodes h3,
.shortcodes h4,
.shortcodes h5,
.shortcodes h6{
float:none !important;

michaelmiller comments:

Thanks Bob, awesome answer.

I ended up using your suggestion instead of Luis' since it seemed to be the simplest way to resolve everything at once. I added the line, the rest of the site is working perfectly, and all is well.

Thank you!


Arnav Joy answers:

sorry I am getting your problem , can you explain it more ?


Sabby Sam answers:

Hi Michael Miller,
It is pretty simple. I believe you must be using WP editor.

You just have to select the text and click on add a link button
Reference for screenshot attached.
for eg :
Links to fantastic national energy education resources.
If you are coding then
You have to write in this way
<a href="http://sitelink"> Links to fantastic national energy education resources.</a>