Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $taxonomies = get_object_taxonomies( (object) array( 'post_type' => 'psykolog' ) );
- foreach( $taxonomies as $taxonomy ) :
- // Gets every "category" (term) in this taxonomy to get the respective posts
- $terms = get_terms( $taxonomy );
- foreach ( $terms as $term) :
- echo $term->name;
- query_posts(array('afdelinger' => $term->name, 'post_type'=>'psykolog'));
- if ( have_posts() ) : while ( have_posts() ) : the_post(); // The loop ?>
- <?php echo $termname; ?>
- <h1 class="entry-title"><?php the_title(); ?></h1>
- <a href="<?php the_permalink()?>">test</a>
- <? $images = get_post_meta($post->ID, 'profilbilled', true);?>
- <img id="profile-image" src="<?php echo $images[0]['image']; ?>" alt="<?php echo esc_attr($images[0]['title']); ?>" />
- <?php
- endwhile;
- wp_reset_query();
- endif;
- endforeach;
- endforeach;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment