Support

Account

Home Forums General Issues Get rid of paragraph tags

Solved

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 James,

    CMinds team fixed the issue. 🙂

  • 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 🙂

  • Hello James,

    Thank you very much, it does make sense. 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Get rid of paragraph tags’ is closed to new replies.