Support

Account

Home Forums General Issues How to display relationship field after the first paragraph?

Helping

How to display relationship field after the first paragraph?

  • Hello

    Can anyone help me to show value in a relationship field after the first paragraph like this one

    I’ve researched on the Internet for a week but couldn’t find a solution.

    Thanks

  • 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

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

The topic ‘How to display relationship field after the first paragraph?’ is closed to new replies.