Home Forums General Issues Getting ACF Fields Values From a Subdomain


Getting ACF Fields Values From a Subdomain

  • Hi everyone,
    I need to retrieve ACF fields values from posts located on another WordPress install on a subdomain.
    I’m thinking about the best way to do it.
    Should I try to use ACF methods?
    Build a straight sql query to the subdomain DB?
    I don’t really know where to start.

    Thanks in advance.

  • Are you talking about a mutlisite installation?

    If you want to use ACF on mutlisite and you want to get values from another sites.
    1) The ACF fields must exist on both sites
    2) Use switch_to_blog()

    If you follow the above everything else should work according to ACF documentation.

  • Hello John, thank you to be here.

    It’s not a multisite installation.
    There are two distinct websites ( and and two distinct directories on the same server. B is on a subdomain.

    Some ACF fields will be populated on the admin side in posts (a repeater and few booleans) on website
    I have to get the values of these fields to include them in a form to be filled by visitors on website

    The form on will be the same for every post except for the few fields coming from which will be specific to each post.

    Does that make sens?

  • There isn’t a way to use function to get ACF values from a separate WP installation. You’ll need to build a separate application either by doing DB queries directly on the DB for the other site or by using some type of API an possibly CURL to get the values from the other site.

  • I get it. Thank you for replying.
    I’m doing trials right now using wpdb.
    I’m struggling to filter repeater data this way but looks promising.

    Silly idea:
    Is it possible to create an ACF object from data on the fly (in memory) then use ACF methods on it?

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

You must be logged in to reply to this topic.