[acf_txt1]

$ query = new WP_Query( array( 'p' => XXXXX ) );
$ query->the_post();
The magic Code/Shortcode [ xyz-ics snippet="id"], although invisible, will force the values to be retrieved from the designated remote post 


36347% Typography4
[acf_txt1] [ acf_txt1] Works here!


36347%[featured id=’36347′ my_field=’acf_excerpt’]

   Display new |acf_wys1| shortcodes in functions.php   |acf_wys1| wrong image, |acf_excerpt|, |acf_wys2| entangled id's!!
[ acf_wys1] in functions.php 
function wys1_shortcode (){
    global $ post;
    $ acf_wys1 = get_post_meta( $ post->ID, 'acf_wys1', true );
    return $ acf_wys1;
}
add_shortcode( ' acf_wys1', ' wys1_shortcode' ); 

29311% Card5 [ acf_wys1][acf_wys1][ acf_excerpt] [acf_excerpt] Testing


•••••••
•••••••
[ acf_wys2][ acf_wys2] DISABLED


Careful with
1/ conflict betw. 2 types of shortcodes in Functions.php (Beaver with the variable "featured" and the new one below, added on Sept2)
2/ Issues with sas_spoilers and image in acf_wys4. Had to revert to Su_spoiler

   Code examples  Incl. code to shortcode
NotOK with shortcodes in remote posts ACF
[ acf_wys1] in functions.php 
function wys1_shortcode (){
    global $ post;
    $ acf_wys1 = get_post_meta( $ post->ID, 'acf_wys1', true );
    return $ acf_wys1;
}
add_shortcode( ' acf_wys1', ' wys1_shortcode' ); 

BeaverB [ featured id='...' my_field='acf_...'] in functions.php
function gg_get_field($attr){
    $args = shortcode_atts( array(     
            'id' => '1',
            'my_field' => 'featured'
        ), $attr );
 
    return get_field($args['my_field'], $args['id']);
}
add_shortcode( 'featured' , 'gg_get_field' );

PHP code to get a custom field from a specific post   
‹?php the_field('acf_excerpt', $post_id); ?› 
OK with shortcodes in remote posts ACF
[ Insert-remote-post-ACF-fields-xyz]
< ?php query_posts('showposts=2'); ? > 
< ?php while (have_posts()) : the_post(); ? > 
[ su_spoiler title="   " open="no" style="fancy;" icon="folder-2" anchor_in_url="no"]
< ?php the_id(); ? >
< ?php the_field('acf_excerpt', $post_id); ? >
< ?php endwhile; ? > 

//WP recommend never to use query_posts
// Shortcodes enabled in Custom Fields: functions.php (field by field)
echo do_shortcode(get_post_meta(get_the_ID(), "MyCustomField", true));
//Check > do_action_ref_array( 'pre_get_posts', WP_Query $query )
//Note: a text field is plain text, therefore it can be directly utilized in php, which is what get_field() is for, rather than the_field() that wraps the data into its own echo function so it’s simply do_shortcode( get_field('name') );
of course the best practice in case there’s no data and if there’s extra html around it is to check if it exists first. ACF docs

if ( get_field('name') ) {
	echo do_shortcode( get_field('name') );   }

add_filter(‘acf/format_value/type=text’, ‘do_shortcode’);

Notes
DRAFTS from doc examples TBD? 
get_fields([ $post_id], [ $format_value]);
$post_id (mixed) (Optional) The post ID where the value is saved. Defaults to the current post.
$format_value (bool) (Optional) Whether to apply formatting logic. Defaults to true.

[ xyz-ics snippet="addacf" acf_name"acf_txt1"] ··· [ xyz-ics snippet="addacf" acf_name"acf_txt1"] 
[ xyz-ics snippet='addacf' acf_name'acf_excerpt'] ··· [ xyz-ics snippet="addacf" acf_name"acf_txt1"]

PHP code to get a custom field from a post
function related_post_acf_shortcode( $atts ) {
  // extract attributs
  extract( shortcode_atts( array(
    'field'      => '',
    'related_field' => '',
    'post_id'    => false,
    'format_value'  => true
  ), $atts ) );
  // get unformatted value of post object field
  $related_post_id = get_field($field, $post_id, false);
  // get value from the related post and return int
  $value = get_field( $related_field, $related_post_id, $format_value);
  // array
  if( is_array($value) ) {
    $value = @implode( ', ', $value );
  }
  // return
  return $value;
}
add_shortcode('related_post_acf', 'related_post_acf_shortcode');

/*  shortcode
  [related_post_acf field="post_object_field_name" related_field="field_name_on_other_post"]
*/

Excerpts | Featured | Tests for Beaver Builder PHP, custom shortcode [ featured id=” my_field=”] in functions.php


Test results: the solution works fine for html, but fails on shortcodes contained in the source posts’ fields. Only the “html” is called, NOT the content generated through shortcodes within each origin post.


   Custom BB featured shortcode display |featured id=54313 my_field=featured|
%%%% [ xyz-ics snippet="id" _id="36347"] %%%%
[featured id='54313' my_field='featured'] [ featured id='54313' my_field='featured' ]

Illustration: Articles 1 & 2 side by side Why is it OK here, in Excerpts or Front page, and not in /posts/acf-documentation-functions/?
The shortcode inserted into this post calls the ACF fields from posts Article1 & Article2 with the following values. Both show that the versions using shortcodes now pull data from their origin post.

54313% [ “id” _id=”54313″] Article1
[ featured id='54313' my_field='acf_excerpt' ] 
[featured id=’54313′ my_field=’acf_excerpt’]
50955% [ “id” _id=”50955″] Article2
 | [ featured id='50955' my_field='featured' ] 
[featured id=’50955′ my_field=’featured’]


EXCERPTS FROM OTHER POSTS USING CONTENT VIEWS PRO | Displays ACF_excerpts field from Posts (eg Article1, Article2 etc.) via the Content View Pro plugin
Note: Advanced Custom Fields (ACF) are now displayed correctly when a filter is applied thanks to this .JS snippet in CV settings


CONTENT VIEWS “PINTEREST” GRID | With filters (Limit 12)
[ pt_view id=”9dcf61fmzf”] REACTIVATE THIS ONE


[ pt_view id=”a0f856e60p”]
[ pt_view id=”cb2a9144sz”]

·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•··•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•··•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·

BOTTOM PAGE SECTION

FLEX: √clearfix √box20-20-20-20-20
Q0

▷Q1
ow3-card-float ow3-container
Q2

Q3

Q4