TAXONOMY.PHP

<?php get_header(); echo '<br>'; ?> <?php echo 'TAXONOMY.PHP'; echo '<br>'; ?> <h2>Tytul kategorii: <?php single_term_title(); ?></h2> <span>Opis kategorii: <?php echo term_description(); ?></span> <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); // mojeTAGI || Kraje ?> <?php $loop = new WP_Query(array( // petla z zawezonym wyszukiwaniem 'post_type' => 'mytyp', 'tax_query' => array( array( 'taxonomy' => $term->taxonomy, 'field' => 'slug', 'terms' => single_term_title("", false) ) ) )); while($loop -> have_posts()) : $loop -> the_post(); ?> <a href="<?php the_permalink(); ?>"><h2><?php the_title(); ?></h2></a> <p><?php the_content(); ?></p> <?php endwhile; ?> <?php echo '<br>'; get_footer(); ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.