I am quit new to wordpress and have a problem I cannot seems to solve even with a day of google searching. This is what I did:
- I have created a custom post type called lookbook. This works fine and I can add new items and such.
I added a taxonomy so I could add an category to it.
function lookbook_taxonomy() { register_taxonomy( 'jeans','lookbook', array( 'hierarchical' => true, 'label' => 'jeans', 'query_var' => true, 'rewrite' => true ) );
}
Using
wp_query
orquery_posts
I can retrieve the lookbook items and display their content.(problem) When I pres the category link provided by word press the page just goes back to index. The link changes to the desired filter however NO post are being filtered. I tried all kinds of stuff but I can seems to find a way to just press the category link and just diplay those post.
update: (code I used to register post type)
add_action('init', 'lookbook_register_post_type');
function lookbook_register_post_type() {
register_post_type('lookbook', array(
'labels' => array(
'name' => __('lookbook'),
'singular_name' => __('lookbook')),
'public' => true,
'capability_type' => 'post',
'supports' => array(
'title',
'excerpt'
),
'has_archive' => true,
'taxonomies' => array('category','post_tag')
)
);
}