how does category really works?
-
Ive been re-reading the codex and its just very confusing to me. ive been doing trial and error but cant seem to make it actually work the way i want it to be. please understand that im quite new in WP
Questions below:
1) is category.php necessary? is this something i need to show a posts from a specific category. (e.g cars) all cars posts should be displayed here
OR its a page where all categories is listed (like if i have more than 1 categories)?2) i created a category.php and used this code
<?php get_header(); ?> <?php /* Template Name: CARS */ ?> <?php query_posts('category_name=cars&showposts=15'); ?> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_content(); ?> </a> </li> <?php endwhile; ?> <?php get_footer(); ?>
^ not sure if this is standard, or should i create a custom php page (like cars.php) and use it as a template page.
regards.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘how does category really works?’ is closed to new replies.