WordPress.org

Support

Support » Plugins and Hacks » Custom Content Type Manager » [Resolved] [Plugin: Custom Content Type Manager] Relation post

[Resolved] [Plugin: Custom Content Type Manager] Relation post

  • Hi!
    Really great, great plugin, the best one i think! 🙂
    Im developping a custom content type, where u can choose to select other post for the same type, so there is a relation.

    In the template im using this snippet:

    $my_array = get_custom_field(‘casisimili:to_array’);
    foreach ($my_array as $items_id) {
    $post = get_post($items_id);
    print $post->post_title;
    }

    How can i get also the first image inside the foreach of my custom field “image_field:to_array” ?

    Thanks and im sorry for my bad english.

    Matteo.

    http://wordpress.org/extend/plugins/custom-content-type-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • i got it

    $post = get_post($items_id);
    $my_array = get_custom_field(‘dopo_image:to_array’);
    $image_id = $my_array[0];
    echo wp_get_attachment_url( $image_id );

    Plugin Contributor fireproofsocks

    @fireproofsocks

    Glad you got it. There are MANY ways of getting this data — as long as you found a solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Custom Content Type Manager] Relation post’ is closed to new replies.
Skip to toolbar