Display WP Custom Post Type fields in another page/post via shortcode

I ask for help to create a code for WordPress to enable in functions.php the following function:

I would like to collect the most recent update of a particular Custom Field Metabox created through a particular Custom Post Type published most recently, to be displayed via a shortcode on another Page or default Post.

Example:

Custom Post Type name: “A”

Custom fields of the latest “A” custom post published:

  • Custom field name “1” = Text to be displayed.
  • Custom field name “2” = Other text to be displayed.

Will be displayed in post/page via shortcode in the text editor:

  • [field-name1] = Text to be displayed.

  • [field-name2] = Other text to display.

How could I make it work?

Thanks in advance for your help!

Read more here: Display WP Custom Post Type fields in another page/post via shortcode

Leave a Reply

Your email address will not be published. Required fields are marked *