PHP Code widget how following arguments
-
in the right sidebar of my page (https://www.diveneycue.com/wordpress/) i am using the PHP code widget with the following code:
<br /> <?php $my_query = new WP_Query('category=45&orderby=post_title&order=ASC&showposts=10'); if ($my_query->have_posts()) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php endwhile; } ?>
what it should be doing is listing only those posts from my Events category (category ID = 45). but it seems to be including postings that are not in my Events category. also, it doesnt appear to be listing the stuff in alphebetical order, by title, as I though I had correctly written in the php arguments.
please advise whats wrong. thanks.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘PHP Code widget how following arguments’ is closed to new replies.