Backbone.js powered proof of concept WordPress theme

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.

WP Backbone theme

The theme is still in development and lots of features are left to implement. If you want to contribute, you are more than welcome :)

Demo Github

15 thoughts on “Backbone.js powered proof of concept WordPress theme

  1. 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)!

  2. 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.

    • 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.

  3. 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}})

Leave a Reply