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

Matt Campbell
Matt Campbell
9,767 Points

Archive and single pages in admin area for plugin

Howdy folks,

Building a plugin and trying to build something that works like the standard posts page. You have the list of posts and clicking on one takes you to the edit screen.

I know I need to put an ID variable from the DB into the url to link through to but I can't find out much on it.

Is there anything on Treehouse that teaches this or someone who knows? Zac Gordon can you help? Idea to extend the plugin course perhaps?

Thanks.

1 Answer

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hey man,

I think we need a little more info here. Are you building both the listing and details page for the plugin yourself? If so, then yes you would add the ID to the URL (see a normal edit post entry) and you can pull in that ID to set the page and make it editable or whatever custom stuff you need.