Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Maxwell KendallFront End Web Development Techdegree Student 12,102 Points
How to Select which Page to Display Post
I understand how to add a page and how to add a post; however, what I do not understand is how to determine which page your post is displayed on.
Furthermore, it is clear that you can select one single page as a "post page". Yet, is there not an ability to designate which page you would like for a post to display on, and have the ability to determine which page each individual post displays on? This seems so common sense to me, but I have not been able to figure out this functionality.
Thank you for your help! Please let me know if I can be more clear.
Sue Dough35,800 Points
I am not sure if you looked but there is out of the box plugins that claim to do just this. You could also create a page template to display any post you want. You could make it show multiple post. You could make it show post that start with the letter "a". You could make it show 5 specific post. You could make it show a unicorn between each post. You can make it show whatever you want. You could go a lot further and make it heavier customized.
I don't know exactly what you want to show, if you want it automated, if you want to manullay curate post ID's etc. You were not specific.
Lets say I wanted to get the content of the post ID 25 I could ass this in any template.
echo get_post_field('post_content', 25);
Additionally you could create specific category templates ( think of them as pages for the specific posts ) and then add the post to the appropiate category. This would allow a dynamic solution without much extra effort and sounds like it may work for your situation.
It looks like there's no way to do this without digging into code.
Hmm. I'd love to be corrected on this - the article is from 2013, but WP moves pretty quickly. Anyone know any better ways to do this?