Home Forums Backend Issues (wp-admin) Using variables in Field Instructions


Using variables in Field Instructions

  • Is it possible to use any type of “variables” in Field Instructions? I can see that I can use HTML which is good, but what I really want to be able to reference in there is a page ID, such that I can generate a URL suitable for the current page…

    e.g. I made a custom end point which formats the current page for a printer… I want to give the user that link in the wordpress admin field instructions for that page… the URL looks like:{INSERT_PAGE_ID_HERE}

    Does ACF support such a thing as variables in field instructions? If not, how might I achieve what I am trying to achieve here? If there is no work-around, then it would be a very useful feature!

    Best wishes,

  • you can use the acf/load_field filter to accomplish this.

    Instead of field['choice'] like the example shows you can alter field['instructions']

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

You must be logged in to reply to this topic.