An example – to be used in functions.js – to customize both the archive and the single templates for a custom post type registered as my-post-type.
App.filter( 'template', function( template, current_screen ) { if ( current_screen.component_id === 'my-post-type-component-slug' ) { template = 'my-post-type-archive'; //Don't need .html here. } else if ( TemplateTags.isPostType('my-post-type', 0, current_screen ) ) { template = 'my-post-type-single'; //Don't need .html here. } return template; } );
Instead of bugging you on email again 😛 I thought I’d ask here.
I used my code like this;
When I then load my app the menu does not work. The plugin I’m using is called events manager and its slug is “events”
Hi Edward,
Actually it will be more convenient if you can send your question to our support email, so that we can narrow down what’s not working in your exact situation.
We’ll then post the answer here if it can help others 🙂