WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Unique post formatting by category (1 post)

  1. bethdean
    Member
    Posted 7 years ago #

    Hi There,
    I'm a PHP noob, and I'm afraid the codex wasn't much help either. Basically what I want to do is this: On my index display posts with a category of 31 (remaindered links) without a title category, or comments (the top and bottom pretty much.) Then I want to display all other categories normally. Here's the code I currently have in place:

    <?php $posts = get_posts( "numberposts=10" ); ?>
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<p>testing testing 123</p>
    		<h2><?php the_title(); ?></h2>
    			<div class="entrytext">
    				<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    
    				<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    
    			</div>
    		</div>
    	  <?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic