Back

Display Page Record on any Page WP

Copy Below Code View As A Text File Show Text Only Show API Edit Code
                            

<?php $wp_query = new WP_QUERY( array ('post_type' => 'page', 'post_status' => 'publish', 'page_id'=>5) ); if ( $wp_query -> have_posts() ) : while ( $wp_query -> have_posts() ) : the_post(); ?> <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt=""> <div class="title"> <h2><?php the_title() ?></h2> </div> <p> <?php mb_strimwidth(the_content(), 0, 200, '...');?> </p> <div class="readmore"><a href="<?php echo get_permalink(5); ?>">Read More</a></div> </div> <?php endwhile; wp_reset_query(); endif; ?>