After installation your application comes with an example on how to use custom taxonomies. The custom taxonomy actor is registered and can be accessed at #/actors

Architecture

To make it easy to overwrite almost anything, custom potaxonomiessts are split into two different entities:

Taxonomy list

https://wordpress-clients.github.io/hybrid/#/actors

config/pages/list-actors.ts

import { Component } from '@angular/core';
import { ListPage } from '../../src/pages/list/list';

@Component({
    selector: 'page-actors-list',
    templateUrl: '../../src/pages/list/list.html'
})
export class ListActorsPage extends ListPage {
    type: string = 'actor';
}

Posts filtered by Taxonomy

https://wordpress-clients.github.io/hybrid/#/actors/96

config/pages/list-actor.ts

import { Component } from '@angular/core';
import { ListPage } from '../../src/pages/list/list';

@Component({
    selector: 'page-actor-list',
    templateUrl: '../../src/pages/list/list.html'
})
export class ListActorPage extends ListPage {
    type: string = 'movie';

    getQuery() {
        let query = super.getQuery();
        query.actor = parseInt(this.navParams.get('id'));
        return query;
    }
}

Register new Taxonomies

Same as in custom posts all you need to do is copy config/pages/list-actor.ts and config/pages/list-actors.ts, replacing movie and actor by your own taxonomy and custom post type then register the new files under config/pages/index.ts

results matching ""

    No results matching ""