The Loop for WordPress Pages
-
Hi guys,
I’ve attempted to create a loop to display all the content in three pages (Web-Design, Illustration & Patterns) in to a page called View All. How ever it failed miserably, aka it didn’t actually do anything!In the three pages I have a custom field name set as ‘post type’ and the value to ‘portfolio’
This is the coding I used –
<?php query_posts('meta_key=post_type&meta_value=portfolio'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h1><?php the_title(); ?></h1> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> <?php endwhile; ?>Any idea’s how I can get a loop to display the content from those pages?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘The Loop for WordPress Pages’ is closed to new replies.