Home › Forums › General Issues › Get rid of paragraph tags
When I want to display the value, it is diplayed between paragraph tags. How could I get rid of them?
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.
<?php echo get_field('the_field_name',false, false); ?>
But I still get the P tag.
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.
So, I guess, no need to send screenshots, it works when I deactivated CM Tooltip Glossary Ecommerce plugin.
This means that plugin does something that adds the paragraph. Could you please get in touch with their support regarding this issue?
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.
CMinds team fixed the issue. 🙂
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.
the_sub_field() function only accept two arguments. So you should do it like this:
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 🙂
Thank you very much, it does make sense. 🙂
You must be logged in to reply to this topic.
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.