• Resolved kurdt_the_goat

    (@kurdt_the_goat)


    I’m wondering if anyone can help…

    I’m not sure how to modify the code for pageofposts.php to display the page content first, and then a list of posts from a category.

    So i’m after:
    Page Title
    Page Content
    List of Posts from X Category

    Any help greatly appreciated! Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • MichaelH

    (@michaelh)

    Take the loop code from the wp-content/themes/default/page.php and put that after the first div in that example.

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<h2><?php the_title(); ?></h2>
    			<div class="entry">
    				<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    			</div>
    		</div>
    		<?php endwhile; endif; ?>

    Thread Starter kurdt_the_goat

    (@kurdt_the_goat)

    Works exactly like i wanted, thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page of Posts (but with Page content as well)’ is closed to new replies.