Home › Forums › General Issues › Get rid of paragraph tags
Hello!
When I want to display the value, it is diplayed between paragraph tags. How could I get rid of them?
Hi @karnabal,
It is possible to return the raw data from the database by passing a false parameter to the get_field() function like so:
<?php echo get_field('field_name',false, false); ?>
I hope this helps.
Hello James,
Thank you.
I tried:
<?php echo get_field('the_field_name',false, false); ?>
But I still get the P tag.
Hi @karnabal
That’s weird. Could you please share some screenshots of the field settings? Could you please share the URL where you show this field?
Also, could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.
Thanks 🙂
Hey James!
So, I guess, no need to send screenshots, it works when I deactivated CM Tooltip Glossary Ecommerce plugin.
Hi @karnabal
This means that plugin does something that adds the paragraph. Could you please get in touch with their support regarding this issue?
Thanks 🙂
Hi James,
Yep! Creativeminds support answered me to try with disabling parsing (CM Tooltip Glossary Ecommerce plugin highlights terms that are in the glossary) of the ACF fields, and… it works now. But I really need ACF to be parsed. 🙁 I’m asking them if they can make their extension more compatible with ACF.
Hello,
It is possible to return the raw data from the database by passing a false parameter to the the_sub_field function?
I tried this:
the_sub_field('the_field_name', false, false);
But I still have paragraphs.
Can you help me, please? 🙂
For info: a prevous similar topic.
Hi @karnabal
The the_sub_field()
function only accept two arguments. So you should do it like this:
the_sub_field('the_field_name', false);
This page should give you more idea about it: https://www.advancedcustomfields.com/resources/the_sub_field/.
Also, if the entries in the database have paragraphs, then ACF won’t strip it, but it will show it instead.
I hope this makes sense 🙂
The topic ‘Get rid of paragraph tags’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.