Tet banner

Custom Fields
Support MB Custom Post Type Shortcodes don't display on custom posts

  • Creator
  • #18102
    Resolved Allan


    I have a custom post type called "Cat's Profile" and another custom post type call "Dog's Profile".

    When I place this short code, [rwmb_meta id="cats_age" ], created for the "Cat's Profile" on a post under "Dog's Profile", nothing shows up. Is there a way to display custom fields between custom posts?


Viewing 1 replies (of 1 total)
  • Author
  • #18105
    Anh Tran

    Hi Allan,

    The shortcode rwmb_meta you use assumes that the field value it gets is for the current post (which is a dog profile). That's why it doesn't output anything, since cat's age is a cat's custom field.

    To display a custom field of a cat profile, please pass the object_id to the shortcode: [rwmb_meta id="cats_age" object_id="123"].

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.