0

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');
ttmt
  • 5,822
  • 27
  • 106
  • 158

1 Answers1

0
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