Wednesday, 24 June 2015

How Display Content on a Custom Page in WordPress

<?php $recent = new WP_Query("page_id=159"); while($recent->have_posts()) : $recent->the_post();?>

<!-- 159 is Page ID  -->
- - - -  - - - - - - - - - - - - - - - - - 

<?php $recent = new WP_Query("page_id=**ID**"); while($recent->have_posts()) : $recent->the_post();?>
       <h3><?php the_title(); ?></h3>
       <?php the_content(); ?>
<?php endwhile; ?>

No comments:

Post a Comment

Alternative content