Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $posts = get_posts( array(
- 'orderby' => 'id',
- 'category' => 1,
- 'posts_per_page' => 999
- ) );
- if ( $posts ) {
- foreach ( $posts as $post ) :
- setup_postdata( $post ); ?>
- <h4><?php the_title(); ?></h4>
- <p><?php the_content(); ?></p>
- <?php
- endforeach;
- wp_reset_postdata();
- }
- ?>
- <?php
- $posts = get_posts( array(
- 'orderby' => 'id',
- 'category' => 1,
- 'numberposts' => -1 // -1 означает все записи
- ) );
- foreach ( $posts as $post ) {
- ?>
- <h4><?php $post->post_title; ?></h4>
- <p><?php $post->post_content; ?></p>
- <?php
- }
- ?>
Add Comment
Please, Sign In to add comment