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

Justin Estrada
Justin Estrada
34,995 Points

User Profiles with Custom Post Types

Hello everyone I've been thinking of a way to tackle this problem and I'd love to here from the community how you guys would tackle this problem.

So on my clients site we need user profiles that display custom posts created by that user on their profile.

I was debating whether there is an easy way to do this with buddypress or should I just code custom dynamic queries for this.

Love to hear your suggestions!

2 Answers

Jacobus Hindson
Jacobus Hindson
14,429 Points

Hi Justin,

If you use CPT UI to create your custom post types you can set 'Author' as a supported field type for that custom post. Hence you will be able to call a query fairly easily.

Justin Estrada
Justin Estrada
34,995 Points

So no buddypress needed essentially?

Jacobus Hindson
Jacobus Hindson
14,429 Points

I certainly wouldn't think so. There would be some work coding your query but not that bad.

Justin Estrada
Justin Estrada
34,995 Points

Just got about 70% of it done. Here's how it turned out, if you're interested: https://golittleengine2.com/profile/bernice-ayer/