WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a website using WordPress. As I don't want the sidebar, I removed 'get_sidebar()' from my page. But I need to place a category in the content part (like a category for latest news) - not in a sidebar. How could I do this?

share|improve this question
You mean like a archive list of posts from a certain category? – onetrickpony Jan 5 '11 at 17:18
Yes..how could i do this..? – anit Jan 5 '11 at 17:41

You can do this with a query

global $post;
$args = array( 'posts_per_page' => 5, 'offset'=> 1, 'category' => 1 );
$myposts = get_posts( $args );
foreach( $myposts as $post ) :  setup_postdata($post); ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>


You can put that in your category page or in something like Exec-PHP plugin

For looking up the current category you can grab it like

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.