SOLUTION PASTEBIN LINKS::
- http://pastebin.com/YmXVC1kn - Author Single Post
- http://pastebin.com/g0xgvxgh - Book Archive Template
Please refer to these files here - solved by storing the post ID in a variable and reworking how I was nesting my loops.
I would like to display a single post (from a custom post type "authors") - then immediately underneath this post's content I want to display a list of other posts that I have assigned to this specific post (from a custom post type "books").
For the "books" custom post type I am currently using a custom meta box containing a dropdown (select field) - this field pulls in a list of published posts("authors") and saves the "author" post's ID to the meta field.
What I want to do on the single template is only show posts whose meta field value is equal to the ID of the post currently being display. Basically only show the list of "books" for this single "author" ... is this doable?
I would need to do the reverse as well ... so when viewing an archive of "book" posts I would like to show the "author" post associated with it underneath... so one loop to pull in the "book" content and nested inside is another loop to pull in the "author" post title, etc... I am assuming by comparing the content of a meta field against the post ID?
How do I store the ID of the "author" post to compare across loops? How do I store the meta field value to compare against the ID - again across loops or nested loops? Or If I am totally going the wrong way with this please enlighten me ;)
If anyone can point me in the right direction it would be most greatly appreciated!