Wordpress multisite and custom field suite

649 Views Asked by At

I'm using the Custom Field Suite plugin - http://customfieldsuite.com/ in a WordPress Multisite.

I'd like to get field contents from one site and display them on another.

I can switch to the blog and get the page I need but how would I get the fields content.

    switch_to_blog(4);

    $post_7 = get_post(7);
    $title = $post_7->post_title;
    echo $title;

    $important_facts  = cfs()->get('why_its_important_facts');
1

There are 1 best solutions below

0
On
CFS()->get($field_name, $post_id, $options);

So all you need to do is add a second parameter to your function call, like this:

$important_facts  = cfs()->get('why_its_important_facts', $post_7->ID);

See the docs