WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields - multiple values that display in a list (1 post)

  1. evalovisa
    Member
    Posted 2 years ago #

    Hello,

    I'm working on a site for an music events manager. I'm using the Advanced Custom Fields plug-in to customize the my singe-event.php

    I have an area dedicated to who is performing at each event.
    I've created custom post-types for each artist and then used the Advanced Custom Fields 'relationship' field type, filtered it to only pull from my Artist post types, and then I choose however many people are performing.

    The result I get is a string of what I am assuming is my post ID for each artist.

    I looks like this:
    329,320,321,295

    I would like it to display a list of the Post Title links (a.k.a. artist names) and not the post ID.

    Here is my code. Please be gentle, I'm learning :)

    <h2>Performing</h2>
    <?php global $wp_query; $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'artist', true);?>

    Thank you in advance to whoever takes the time to help me out. I really appreciate it!

Topic Closed

This topic has been closed to new replies.

About this Topic