• I’m looking to create a “Features” image carousel that pulls a custom field value from a post and echo it into a HTML img tag.

    There will be three featured images, each with a url to the image in a custom field. I’ve tried using the following code but wasn’t sure how to use it when I’ll be using random post IDs.

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'customField', true);
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • what about using something like a customised jcarousellite to handle the images and html, pull the images in for display via custom field and change the loop for a random selection of articles, by category or similar.
    🙂

    Thread Starter trginter

    (@trginter)

    That could work.

    I’ll look into that plugin. Thanks!

    Thread Starter trginter

    (@trginter)

    I’m having an issue using two Loops.

    When I try and retrieve a custom field without using a second loop nothing comes up.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images w/ Custom Fields Outside Loop’ is closed to new replies.