display posts under specific page

I am having many number of pages, I would like to display some specific posts under one specific page. for example Under News page i need to display only news related posts only

how to do this?

Answers


This is a new query, won't effect the main Wordpress loop and can be used multiple times on a page. Change parameters to your category name and number of posts to show. Use in a page template or in page editor with php execution enabled.

<?php $my_query = new WP_Query('category_name=mycategory&showposts=1'); ?>

<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">

<?php the_title(); ?></a>

<?php the_content(); ?>

<?php endwhile; ?>

Need Your Help

Should user input cause checked exceptions?

java exception-handling checked-exceptions

I have an operation/method that performs an insert to a database. It takes several fields and for various reasons that operation could fail because one or more of the inputs was not unique or because

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.