Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKonrad Pilch
2,435 PointsSetting a celebrity as the produces, custome filed
HI,
So in WordPress, i have custome post type page, where i put in celebrities. I put their name, picture, about etc..
Now, i have another page 'Music' where i put their music and on the sidebar theres their name and excerpt of the about them.
How can i make so each celebrity added, can now be selected with the video? so if i add a song e.g. Love Me by Selena Gomez, i need to select her profile form celebrity and assign her to the song.
2 Answers
Kevin Korte
28,149 PointsYou could create a custom category taxonomy, and populate the options with the names of the celebrities. Than when add the video, you also choose the celebrity or celebrities that need to be included, and than you can use php logic in your templates to either show the attached celebrities on the video page, or the videos on the celebrities page? That custom taxonomy will give you the link you need.
Read all the way through this: https://codex.wordpress.org/Taxonomies
Sue Dough
35,800 PointsEasy. Change the way your doing it. Make them users instead and the author of the posts.
Then for the music page just do a loop and display the author and the data you want.