What is the URL of my taxonomies
-
Hi, community.
I am working on a website with movie reviews. I did some changes in the code and now I cannot access the archive pages of the taxonomies anymore. The website is based on the _s-master theme, and I coded it myself. But as the site grew bigger and bigger, I got lost in my own code. ??in my functions.php I have this:
function genre_init() { // create a new taxonomy register_taxonomy( 'review_taxonomy_1', array('post', 'os_review', 'os_buch_review', 'os_classic_review', 'os_versus' ), array( 'hierarchical' => true, 'label' => __( 'Genre' ), 'rewrite' => array( 'slug' => 'review-genre' ), ) ); } add_action( 'init', 'genre_init' );
And this:
function custom_taxonomies_terms_links_genre() { global $post; //custom taxonomy: $taxonomies = array( "review_taxonomy_1"=>"Genre: " ); foreach ($taxonomies as $tax => $taxname) { // get the terms related to post $terms = get_the_terms( $post->ID, $tax ); if ( !empty( $terms ) ) { foreach ( $terms as $term ) $out .= '<a>slug, $tax) .'">'.$term->name.'</a> '; } } return $out; }
So what would be the URL of a movie within the genre “action” or “horror”? Can anybody see that in the code I posted? Or if not. Does anybody know how the URL of a specific taxonomy is created?
Thanks a lot!
Raphael
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘What is the URL of my taxonomies’ is closed to new replies.