I was thinking to build a WordPress theme based on Backbone.js for a long time and wasn’t getting enough time to do that. Yesterday I took the idea again and started quickly. Right now it’s working pretty great as expected. See it here.
The theme is still in development and lots of features are left to implement. If you want to contribute, you are more than welcome π
Hi there!
It’s working great!
Would love to read some comments on the work behind it. Really!
Congrats!
Thanks π
Well not that much going on here. Powered by backbone.js, underscore templating and JSON REST API plugin!
Hey Tareq, really excited by this, been wanting to see backbone.js get the attention/integration it deserves for a while now π
Any initial thoughts on how you’d feel if it had a dev framework in the background, like hybrid-core, at some point?
Also, I seem to be getting a 403 on your demo link.
Having a server wide problem right now. The main site is also down and you can’t see the demo yet. May be check later tomorrow π
It really changes the context of frameworks. Any theme files isn’t being used here, only the
index.php
. The rendering is done by underscore.js templates and the routing is handled by backbone.js. So it’s likely moving towards a new direction (PHP to JS)!great proof of concept! i think that using wp as a content management backend / rest api server and completely delegate the frontend part to backbone it’s a new powerful way of theme development
Your work for this proof of concept really deserves a follow up. Any plans for the near future?
Currently there is no support for categories and custom post types. These are in the roadmap now.
tareq, are you open to developing this further and selling it in the market? if so, let me know and maybe you and I can collaborate. aside from that idea did you try the fairly new pushstate to avoid the hashtag and page add on?
thanks,
eli
I thought about that, but it’ll be a problem supporting other plugins and forms. As everything is loaded via ajax, any contact form or other plugin will be broken unless they are specially handled. So giving support to all of them will be great pain, also there are custom post types and taxonomies and don’t forget about permalinks.
I tried the push state method of backbone.js that time, didn’t worked well. So didn’t tried further after that.
is there a way i can use this permalink: /%year%/%monthnum%/%postname%.html/ ?
Not yet, the permalink structure is hard coded right now and it’ll only work in that permalink, cause you’ve to assign backbone.js routing that way.
great work! very interesting
Is this theme still working for you…?!?! i can’t use it… i dont works for me.. π
it dont load the posts…
Is there a way to change the “post per page” through backbone fetch? I’m trying to list all posts within a custom post type.
this.collection.fetch({ data: {type: ‘team’})
Never mind found it in the class-wp-json-posts.php
this.collection.fetch({ data: {type: βteamβ, filter: {posts_per_page: 20}})