WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Just Custom Fields] How can I get 'upload media' content!

[Resolved] [Plugin: Just Custom Fields] How can I get 'upload media' content!

  • Hi!

    I’m using this plugin, and I added a “upload media” custom field. My question is, how can i get the content of this custom field in my template?

    My custom field is called ‘slideshow-inicio’, and i try to get it with this code: <?php echo get_post_meta($post->ID, ‘slideshow-inicio’, true); ?

    But it not works :((

    http://wordpress.org/extend/plugins/just-custom-fields/

Viewing 1 replies (of 1 total)
  • Hi
    All values are saved as usual post meta data. So you can get them with function
    $images = get_post_meta($post->ID, 'slide_images', true);
    where ‘slide_images’ – is slug name of your upload media field.

    $images variable will have the multiple Array inside, which should be similar to this:

    array(
       [(int)image_number] => array(
              [image] => real_image_source
              [title] => value // optional
              [description] => value // optional
          )
    )

    Hope this helps. You can also read more info on our official plugin page:

    http://justcoded.com/just-labs/just-custom-fields-for-wordpress-plugin

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Just Custom Fields] How can I get 'upload media' content!’ is closed to new replies.