Can anyone show me a way of displaying all the posts I have in the current month (ie, January 08) and specifically from a specific category on the frontpage?
Can anyone show me a way of displaying all the posts I have in the current month (ie, January 08) and specifically from a specific category on the frontpage?
Before the Loop in your main index.php file, add something like this:
if (is_home()) {
query_posts($query_string . '&cat=123&monthnum=' . date('n',current_time('timestamp')));
}this is what is in my index file
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
?>
so add the above code in there like so :
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
if (is_home()) {
query_posts($query_string . '&cat=123&monthnum=' . date('n',current_time('timestamp')));
}
?>
No. You never ever edit the short and sweet index file.
Mess around with the index file of your theme.
This topic has been closed to new replies.