• gregorylepacha

    (@gregorylepacha)


    Hi,
    Hi,

    I’m trying to get posts from the category ‘news’ posted during the current month.
    Does someone have done this before?
    (news contains sub categories)

    I’m trying to get something like this:

    sub1

    • Article 1
    • ARticle 2
    • sub2

    • Article 1
    • ARticle 2
Viewing 1 replies (of 1 total)
  • Thread Starter gregorylepacha

    (@gregorylepacha)

    I have tried this but it still doesnt work:

    <? 	query_posts('cat=3&amp;monthnum='echo date("n");'&amp;year='echo date("Y");''); ?>
    		<?php if (have_posts()) : ?>
    			<ul>
    			<?php while (have_posts()) : the_post(); ?>
    				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><font style="font-size:10px;font-style: italic;padding-left:5px;">(<?php the_time('d/m/Y') ?>)</font></li>
    			<?php endwhile; ?>
    			</ul>
    		<?php endif; ?>

    it displays pages…

Viewing 1 replies (of 1 total)

The topic ‘Query post by Specified category and current month’ is closed to new replies.