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

Using AngularJs in Wordpress theme

Hi, I've watched closely how Jim implements the Dribble API and consuming it using AngularJs, I would like to be able to do something similar with my Wordpress theme to seamlessly fetch posts into the view, yet I can't seem to know where to start.

Thanks

3 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I talked with Jim and we don't have an exact answer for you, but I would suggest looking into the WP AJAX API for plugin development. You should be able to hook into what you need using that and WP_Query.

Please let us know how it goes.

Quick question for you though: Why?

Done, let me know what you think Zac Gordon http://zyadsherif.com

Zac, thanks for the response

Well as for why, am building V 3.0 for my portfolio and it'll be a single page website and will bring ajax projects to the view, I didn't have much experience in AJAX and was very enthusiastic about Angular when I watched the tutorial.

After a whole day reading I installed a json api plugin for wordpress & consumed the data from the view, but am sure this is totally the wrong way to ask for the service while you are that service ... yet seems to be working fine.

am launching in hours will be posting it here for you to have a look

Thanks a lot

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Oh cool man!

Yeah, it might feel like a bit of a hack. I'm curious if you come up with something you feel is cleaner?

Looks really good though and you'd never know it wasn't using standard templates.