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 trial

WordPress WordPress Basics Managing Content in WordPress Posts in WordPress

Maxwell Kendall
seal-mask
.a{fill-rule:evenodd;}techdegree
Maxwell Kendall
Front 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.

2 Answers

Sue Dough
Sue Dough
35,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.

Hi!

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?