In myne sidebar i have the code:
<?php BX_get_recent_posts($p,10); ?>
This show a list from the latest 10 post. But i want not al post show, but only post from the catagorie hardware. How can i do that?
I hope someone can help me...
In myne sidebar i have the code:
<?php BX_get_recent_posts($p,10); ?>
This show a list from the latest 10 post. But i want not al post show, but only post from the catagorie hardware. How can i do that?
I hope someone can help me...
<?php $posts = get_posts( "category=2&numberposts=1" ); ?>
I haven't tried it, but that should work.
Along with the codex, here's a great resource:
This is what you want, I think..
<?php
$temp_query = $wp_query;
$catposts = 'cat=CAT_ID&paged=1&order=DESC';
query_posts($catposts);
while (have_posts()) : the_post();
echo '<a href="';
the_permalink();
echo '">';
the_title();
echo "";
endwhile;
$wp_query = $temp_query;
?>
This topic has been closed to new replies.