MultiformeIngegno
Member
Posted 6 months ago #
Hello. I'm trying to have a certain category archive as my home page.
I found this code but I don't know where to add it:
<?php query_posts('cat=X&showposts=X'.get_option('posts_per_page')); ?>
In loop.php but.. where exactly?
Thanks in advance!
P.S.: Child theme of TwentyTen.
MultiformeIngegno
Member
Posted 6 months ago #
Uhm.. I'd like a more "clean" way! ;)
Yeah I figured you would.
I'm not an expert but I think you would change this:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
to something like this(this example excludes category 4 posts:
<?php query_posts('cat=-4'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
The easiest way to do this would be to create a loop-index.php file in the child's folder that contained your custom query and a basic Loop.
MultiformeIngegno
Member
Posted 6 months ago #