Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $m = $_GET['themonth'];
- $y = $_GET['theyear'];
- $cat = $_GET['cat'];
- $args = array(
- 'posts_per_page' => -1,
- 'monthnum' => $m,
- 'year' => $y,
- 'cat' => $cat // I Made this a variable instead of a hardcoded '7', in case you ever want to send it a different category -G
- );
- $cat_q = new WP_Query( $args );
- if ( $cat_q->have_posts() ) {
- $p = 0;
- while ( $cat_q->have_posts() ) {
- $cat_q->the_post();
- // For long strings of HTML, you can just close PHP and reopen it when you need it again -G ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement