Fix links when char limit hits in the middle of a tag.
-
I run into a certain situation where the ‘read more’ link breaks.
What’s happening is when the word limit is reached and it’s in the middle of a link.
[tpg_get_posts fields="post_title, post_content" category_name="news" numberposts="4" show_entire="false" show_excerpt="true" shorten_content="w575" show_meta="false" more_link_text="Read More →"]
So I’ve got text like this:
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris <a href="test-link-here">nisi ut aliquip ex ea commodo consequat.</a>
I’ll get at the end
...laboris Read More
but the Read More won’t be linked. If you inspect the code, you’ll see a brokena href
tag with the link in it, like this:
<a href="<a href="test...
- The topic ‘Fix links when char limit hits in the middle of a tag.’ is closed to new replies.