WordPress.org

Ready to get started?Download WordPress

Forums

Get custom field values from specific post type to other template (1 post)

  1. mofsiz
    Member
    Posted 9 months ago #

    Hi,

    I have a gallery post-type which contains several custom fields and are given out individually on every post.
    On the template for this post type I can get a custom field value via for example
    <?php $height = get_post_meta($post->ID, 'height', true); ?>
    and echo it then. So the post IDs are automatically identified because the custom fields are filled out in the editing of the template and are attached to this post type.

    But how I get the custom field values to show on another template, which has those fields not integrated?

    Thanks.
    Maze

Reply

You must log in to post.

About this Topic