Anyone know how to make a page link on the navigation bar, link to a page that has just every post from a category on?
Thanks,
+rep for any help![]()

Anyone know how to make a page link on the navigation bar, link to a page that has just every post from a category on?
Thanks,
+rep for any help![]()
Back for a while![]()
Here's the code to list posts in a specific category. I guess making a new page in your theme dir and using this code in it.PHP Code:<?php query_posts('category_name=articles&showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></p>
<?php the_content('Read the rest of this entry »'); ?>
<p><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
</div>
<hr>
<?php endwhile; ?>
Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/
I wanted to find the exact same thing out. After trying many things, I finally found the solution! Make a new page but as the page title use;
If you want your pages in a certain order in the navigation are, then use the wordpress number tool, as this method of using categories as pages thinks that the < is 1'st in the alphabet.Code:<a href="http://YOURSITE.com/category/CATEGORYNAME">CATEGORYNAME</a>
Enjoy, Tom.
Last edited by Jahova; 06-12-2009 at 06:09 PM.
"RETIRED" FROM HABBO(X)
:¬:
TOMSPIT / COWLY05
It doesnt work :S
:/
i'd of thought this would of been simpler than this lol!
Posts Merged by Jamesy (Forum Super Moderator): Due to forum lag![]()
Last edited by Jamesy; 06-12-2009 at 08:21 PM.
Back for a while![]()
anyone else got any ideas? :/
Back for a while![]()
My method does work, I am using it on my blog right as I am typing this.
"RETIRED" FROM HABBO(X)
:¬:
TOMSPIT / COWLY05
www.pixonder.com - doesnt seem to work with the PHP and mysql bit :/
have you set your permalinks to that format?
Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/
Yh, grrr :L!
Really? They still show up like this: http://www.pixonder.com/?page_id=2
Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/
Want to hide these adverts? Register an account for free!