Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'post_type' => '', // typ postu - w twoim przypadku po prostu post
- 'post_status' => 'publish', // status - tylko opublikowane
- 'posts_per_page' => 10, // ilosc importowanych postow
- 'cat' => 'ID', // id kategorii (integer)
- );
- $query = new WP_Query($args);
- ?>
- <?php if($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
- <a href="<?php the_permalink(); ?>">
- <?php the_title(); ?>
- </a>
- <?php endwhile; ?>
- <?php endif; ?>
- <?php wp_reset_query();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement