Issues with insertion of ACF fields sourced from other posts into this page
DOCUMENTING THE ISSUE: This page highlights the desired workflow and the cases in which ACF fields containing shortcodes do not process the proper ACF field values.
THE SEARCH FOR A SOLUTION: Identification of two post grid plugins, where a solution to the processing issue might be found. Identification of code snippets.
Objective: The objective is to source select ACF fields including texts, images etc. from other posts such as Articles (the source posts) and to insert them into this Front page (the destination page), in order to tease viewers to go and read the full article.
Problem: The problem is that in most cases SHORTCODES contained within ACF custom fields in the post/Articles are NOT executed remotely. They get mixed up when they reach this Front page and process values from the equivalent custom fields present here.
1. Hidden content (portion of page)
Workflow: The ‘featured’ article ACF field is targeted using the following shortcodes:
[ featured id='123' my_field='featured']
[ acf field='acf_excerpt' post_id='123']
(See more details below). They allow to select the specific post and the specific custom field from that post. The ‘featured’ field is then inserted into the Front page. The field itself contains several references to other ACF fields within the source post (Images, texts, links etc.)
The issues arise when the ACF content is called from the fields in the Front page, instead of content from the articles.
Inserting the fields from remote posts: The ACF fields below are inserted using the “featured” shortcode which allows to target a post by id and field name.
There are obviously other methods such as the “Insert page” plugin (no field selection) or ACF’s field display methods (that require developer coding skills which we do not have).
To help demonstrate the issue, the text and image ACF field values contained in this Front page’s own “featured” field are inserted here before the article inserts:
id= [ wpbb post:id]
The ACF content and values for this page’s “featured” are purposely highlighted to demonstrate how they may show up by error in the tests. They should NOT show up in the Article inserts below. The issues arise only when the source posts’ ACF fields contain shortcodes. Instead of picking up values from the Article, they pick up the content from the Front page fields.