Home › Forums › General Issues › How to display relationship field after the first paragraph? › Reply To: How to display relationship field after the first paragraph?
There is not easy way to insert fields from ACF into the middle of “The Content”.
You need to get the content, then you need to construct a string that contains the html you want to insert and then use some type of string replacement or regular expression to alter the content and insert your new string into it where you want it to appear.
Your other choice is to build your own shortcode that can be inserted into the content where it needs to be and then build your own function to convert the shortcode into content https://codex.wordpress.org/Shortcode_API
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.