Title: Problem When Page Is Published
Last modified: December 2, 2023

---

# Problem When Page Is Published

 *  Resolved [warrencat](https://wordpress.org/support/users/warrencat/)
 * (@warrencat)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-when-page-is-published/)
 * I’m using this to bring ACF fields into my page, which works great except for
   one very odd issue. When a page is in Draft status, the plugin functionality 
   works as expected, but when the page is changed to Published status, the value
   returned by the shortcode is literally just the word “Array” instead of the actual
   values. Changing the page status back to Draft corrects the issue and sees the
   correct values being returned.
 * I have tested this against a couple of different themes with the same end result,
   so I’m fairly certain it is not a theme conflict. I am running all updated plugins
   and the most recent version of WordPress.

Viewing 1 replies (of 1 total)

 *  Thread Starter [warrencat](https://wordpress.org/support/users/warrencat/)
 * (@warrencat)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/problem-when-page-is-published/#post-17265045)
 * While waiting on the developer’s reply, I’ve continued plugging away at trying
   to diagnose and understand the source of this weird issue. In the course of dissecting
   and trial and error, I was able to stumble on a solution that worked, although
   it’s not yet clear to me why.
 * Within my page where I’m using several instances of the shortcode to surface 
   various ACF values that have been added to the page, I have been using the “data-
   source=post_meta” parameter, which worked fully as expected when a page is in
   draft status, but did not work as expected once a page was published. As an example,
   an ACF checkbox select field would return all the unique selected values with
   the page in Draft status but would only return the word “Array” when the page
   was published.
 * What has ended up working for my specific implementation was changing “data-source
   =post_meta” to “data-source=post_data” parameter, but only for the affected shortcodes,
   along with some modified output customizations within the plug-in source code
   itself. (I know, source code changes are unwise and frowned upon because of potential
   unexpected issues that can crop up or customizations that get reverted with an
   update. But in this instance, I finally have the plug-in working as I need, so
   I’ll deal with it.)
 * I would eventually be interested to know why different shortcode parameter values
   are dependent on page status to work, but for now, I’m able to keep my project
   moving forward, which is my primary and immediate need.

Viewing 1 replies (of 1 total)

The topic ‘Problem When Page Is Published’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shortcode-to-display-post-and-user-
   data.svg)
 * [Display custom fields in the frontend - Post and User Profile Fields](https://wordpress.org/plugins/shortcode-to-display-post-and-user-data/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-to-display-post-and-user-data/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-to-display-post-and-user-data/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-to-display-post-and-user-data/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-to-display-post-and-user-data/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [warrencat](https://wordpress.org/support/users/warrencat/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/problem-when-page-is-published/#post-17265045)
 * Status: resolved