• apology for this rookie question, i managed to create my own index.php and single.php templates.

    I wanted to create a category page that displays 10 posts inside animals category with pagination.

    code below goes to my category.php

    <?php get_header(); ?>
    
    <div id="container">
    <div id="content">
    
    <?php $my_first_category_query = new WP_Query('category_name=my_first_category'); ?>
    
    <?php while ($my_first_category_query->have_posts()) : $my_first_category_query->the_post(); ?>
      <!-- Do special_cat stuff... -->
    <?php endwhile; ?>
    
    		</div><!-- #content -->
    		</div><!-- #container -->
    
    <?php get_footer(); ?>

    after, should i just go localhost/site/category.php?
    ill appreciate for any assistance ??
    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter pedenski

    (@pedenski)

    can someone just direct me to a link that would help me establish my purpose? would greatly appreciate it.

Viewing 1 replies (of 1 total)
  • The topic ‘how to create custom category’ is closed to new replies.