Hello everybody. I would like include this query post in my wordpress:
<?php
if ( is_home() ) {
query_posts( 'cat=-1,-3,-4,-5,-6,-7,-8' );
}
?>
also with this string: posts_per_page=3
How can I do?
Thank you.
Hello everybody. I would like include this query post in my wordpress:
<?php
if ( is_home() ) {
query_posts( 'cat=-1,-3,-4,-5,-6,-7,-8' );
}
?>
also with this string: posts_per_page=3
How can I do?
Thank you.
<?php
if ( is_home()) {
query_posts( array (
'posts_per_page' => 3,
'cat' => '-1,-3,-4,-5,-6,-7,-8',
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ),
))
}
that last 'paged' line is necessary if you need pagination
Thanks Voodoo, but your code gives me an Internal Server Error 500. Why?
I added ?> at the end of your code.
Ah it's ok. Missing ";" at the end :)
Thanks Voodoo
Oh yeah, sorry about that, I copied/pasted from my theme and missed the tail end of it
No problem, thanks :)
This topic has been closed to new replies.