Perhaps the easiest way is to use the Page Links To plugin.
The instructions are a little vague, but here is how to make it link to a category:
- Follow the installation instructions to install and activate the plugin.
- Edit the page you want to display a category.
- Scroll down to the ‘Page Links To’ section at the bottom.
- Click ‘An alternate URL’
- In the ‘Alternate URL’ box, enter ‘http://yoursiteurl/?cat=14’, replacing yoursiteurl with your own URL, and 14 with the category id you want that page to display.
- Click ‘Update Page’.
That should be all you need.
thanks for that,its quite useful. i would like it to show the featured image which is connected to the posts…any idea how i would do that? this is why i wanted queries.
The exact answer to that depends on your theme. If you are using a free theme, post a link to your site here and someone may be able to help. If you are using a paid theme, we cannot examine its code or options, so you should contact the theme supplier.
nah its a skeleton theme which im coding myself…i dont have a live version atm; its only localhost.
is there a way to modify this query which i have running for the homepage so that it will only show on a specific page. you have category = 6, so maybe you could add some sort of page = pagename
<?php
$args = array( 'numberposts' => 3, 'category' => 6 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?>
<div class="rumour-posts">
<div class="rumour-posts-image">
<?php the_post_thumbnail('post-image'); ?>
</div>
<div class="rumour-posts-header">
<h2><a>"><?php the_title(); ?></a></h2>
</div>
<div class="rumour-posts-text"><?php the_content('Read More...'); ?></div>
</div>
<div class="the-posts-line">
<hr />
</div>
<?php endforeach; ?>
Put the code in a template and assign the template to a Page. Then it will be used only on that Page.