I feel like there is a really simple solution to this problem. However, after trying to solve it for about 3 hours unsuccessfully, I humbly come to you.
How would I get and display the contents (specifically custom field data) of a specific band entry (using its ID or title or slug) inside of a regular post? (see diagram below)
(source: thisnewband.com)
.
We have to provide the ID/title/slug so that it knows what band post's content to display
[band id="21"]
) (added inside post content)band-id
where you can input the ID of the band)Shortcode
WP_Query
to query post with type=band and ID="21".functions.php
query_post
with no luck)Custom Field
WP_Query
and had the ID
in the array pull from the custom field.Whether it's by using a shortcode, custom field, or even a new widget, it would be easiest if one could:
get_template_part('band-block');
to echo this code (either in Post Template or Shortcode via functions.php)Thanks for your help! Let me know if you'd like to see any of my code.
With some amazing help from Hobo, I was able to come up with a solution!
The main problem was with trying to query by 'ID'. No matter what we tried, it just never worked well. (It could be the way that the Advanced Custom Fields stored the ID field contents.)
post-band-name
and created with the Advanced Custom Fields plugin.)