Wordpress query post for a specific page


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php $contact_drop = new WP_Query('pagename=contact'); while ($contact_drop->have_posts()) : $contact_drop->the_post(); $do_not_duplicate = $post->ID; ?>
  2. <div id="contact-slide">
  3. <h3 class="page-page-title"><?php the_title(); ?></h3>
  4. <?php the_content(); ?>
  5. </div>
  6. <?php endwhile; ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.