TAG.PHP

<?php get_header(); echo '<br>'; ?> <?php echo 'TAG.PHP'; ?> <h2>Tytul tag'u: <?php single_tag_title(); ?></h2> <?php if( ! empty(tag_description())): ?> <span>Opis tag'u: <?php echo tag_description(); ?></span> <?php endif; ?> <?php $tag_slug = str_replace(" ", '-', single_tag_title("", false)); $loop = new WP_Query(array( // petla z zawezonym wyszukiwaniem 'post_type' => 'post', 'tag' => $tag_slug )); 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.