Backbone.js powered proof of concept WordPress theme

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

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

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

    1. 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’})

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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.