query posts from 2 categories
-
Hi there, im trying to display posts on my homepage from 2 categories.
So far i have ` <?php
// The Query
wp_reset_query();
query_posts(‘showposts=3&cat=229&75’); if (have_posts()) : ?>
<?php while (have_posts()) : the_post();?>
<div>
<div id=”wrapper33″>
<a href=”<?php the_permalink(); ?>”>
<h3><?php echo substr(get_the_title(),0,58); ?></h3>
<?php echo substr(the_category(),1,30); ?>
<?php echo get_excerpt(190); ?>
<?php
$attachment_id = get_post_thumbnail_id(); // attachment ID
$image_attributes = wp_get_attachment_image_src( $attachment_id ); // returns an array
?><br><p><img src=”<?php bloginfo(‘url’); ?>/imgresize.php?src=<?php echo $image_attributes[0]; ?>&h=135&w=400″></p> `
As you can see i tried the two category I.Ds 229&75 but this is not working. If i just have the one it works fine.
Any suggestions?
Thank you
- The topic ‘query posts from 2 categories’ is closed to new replies.