PDA

View Full Version : wordpress....



Fehm
06-12-2009, 02:37 PM
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 :)

Jamesy
06-12-2009, 02:47 PM
<?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 &raquo;'); ?>

<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; ?>

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.

Jahova
06-12-2009, 06:07 PM
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;

<a href="http://YOURSITE.com/category/CATEGORYNAME">CATEGORYNAME</a>
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.

Enjoy, Tom.

Fehm
06-12-2009, 07:51 PM
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 :)

Fehm
06-12-2009, 09:23 PM
anyone else got any ideas? :/

Jahova
08-12-2009, 03:49 PM
My method does work, I am using it on my blog right as I am typing this.

Fehm
11-12-2009, 06:24 PM
www.pixonder.com - doesnt seem to work with the PHP and mysql bit :/

Jamesy
11-12-2009, 07:23 PM
have you set your permalinks to that format?

Fehm
11-12-2009, 07:28 PM
Yh, grrr :L xD!

Jamesy
11-12-2009, 07:40 PM
Really? They still show up like this: http://www.pixonder.com/?page_id=2

Want to hide these adverts? Register an account for free!