• Hi,

    I’ve registered two custom post types using a custom plugin, called ‘album’ & ‘track’.

    Each ‘track’ post is related to an ‘album’ post using ACF relationship field (not bi-directional).

    I can display a single track with a link to its album, as well as archives of tracks and albums, but I can’t figure out how to display all tracks relating to album in the album’s single-album.php template.

    It seems like an easy thing to do, something like “get all the posts of type ‘track’ where the ‘track_album’ field is equal to this post’s title”. But this is getting complicated because the related album is stored in this form, which I don’t understand: “a:1:{i:0;s:2:”56″;}”. I imagine ’56’ would be the post ID being referred to but I haven’t the slightest idea on how to set this query up properly.

    Any help would be much appreciated.

    Thanks.

  • The topic ‘Newbiesh custom field question’ is closed to new replies.