Registering Taxonomies
-
I have successfully added a custom post type and was adding some taxonomies.
There are 3 questions relating to this post as I didn’t want to post 3 subjects regarding the same subject.
#1 do I need to register all taxonomies individually / all together as I have 8.
#2 can I add code to a taxonomy eg. img src=”test.png” so that it would output a picture, and if not how would I solve that issue.
#3 how do I output the taxonomies.
Here is a little code for you to view –function genres_taxonomy() { register_taxonomy( 'genre', 'movies', array( 'hierarchical' => true, 'label' => 'Genre', 'query_var' => true, 'rewrite' => array( 'slug' => 'genre', 'with_front' => false ) ) ); } add_action( 'init', 'genres_taxonomy'); function year_taxonomy() { register_taxonomy( 'year', 'movies', array( 'hierarchical' => true, 'label' => 'Year', 'query_var' => true, 'rewrite' => array( 'slug' => 'year', 'with_front' => false ) ) ); } add_action( 'init', 'year_taxonomy');
its for my movie collection .. that’s in the 1.000’s
Hope you can help
Steven
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Registering Taxonomies’ is closed to new replies.