Home › Forums › Front-end Issues › Shortcode being wrapped with a paragaph tag Fix › Reply To: Shortcode being wrapped with a paragaph tag Fix
Hi @jt-mtl
Thanks for the info. There are a few things with your code I would like to talk about:
1. Always use get_field
when using the value as a variable, not the_field
2. You don’t need to apply the filter manually, this is done already by ACF
3. Your custom filter on the ‘acf_the_content’ looks good, I think this is all that is needed (no manual apply_filters code)
Thanks
E
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.