Display meta value in output
-
Hi Bill,
thanks for the great plugin.
I can’t recreate your example shown here, though: https://displayposts.com/2019/06/23/display-meta-value-in-output/
To recreate it, I did the following.
– In ACF I created a field named “be_event_start”.
– I added a value to that field on a post.
– I put your code from the page above in my child-theme’s functions.php.
– I added the shortcode [display-posts meta_key=”be_event_start” include_event_date=”true”] to a postResult: it does list the right post, but be_event_start is displayed as January 1, 1970. So it doesn’t display the right date.
On the page itself, when using ACF’s shortcode, the right value is displayed for be_event_start.
Any ideas what I did wrong? I changed the name of the wrapped css-class just to make sure wordpress is using the function at all and it does. Using the function in the main theme instead doesn’t make a difference as well.
Any help would be appreciated!
Jan
The topic ‘Display meta value in output’ is closed to new replies.