• Resolved flippy146

    (@flippy146)


    Oke so this is my code.
    I used this code on my homepage to show the posts, as the template (Boldy) I’m working with doesn’t have a loop at the homepage.

    What I want to do, and I’ve seen the same question come by but I can’t get it fixed, is show only one category named ‘blog’.

    Can someone help me out on this?
    Thanks in advance!

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>		
    
    		<!-- Begin .postBox -->
    		<div class="postItem">
    
    				<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
    				<div class="meta">
    							<?php the_time('M j, Y') ?> &nbsp;&nbsp;//&nbsp;&nbsp; by <span class="author"><?php the_author_link(); ?></span> &nbsp;&nbsp;//&nbsp;&nbsp;  <?php the_category(', ') ?>  &nbsp;//&nbsp;  <?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?>
    						</div>
    				<?php the_content(__('Read more >>')); ?> 
    
    		</div>
    
    		<!-- End .postBox -->
    
    		<?php endwhile; ?>
    
    	<?php else : ?>
    
    		<p>Sorry, but there are no entries found to show.</p>
    
    	<?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Looping one category’ is closed to new replies.