Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been looking all over the internet for this, and have not yet found an answer I could use.
Found out that I may can use something called query_posts or get_posts, but I have no idea how to use them.

Isn't there some sort of plugin that could do this for me? Say if I made a post under the category Guides, with the tag of Computer and Internet, it should be listed under a page called Guides for Computers.
Is this possible?

Thank you very much in advance.

share|improve this question
add comment

3 Answers

I've just recently done something like this using the Custom Post Type UI plugin and creating a template file.

The idea goes something like this...

  1. Install Custom Post Type UI, Watch the video, add a new post type called "Computer Guides"

  2. Next you're going to create a page template which will list all your computer guides. To do this is fairly simple. You just create a PHP file, call the template name in the comments section, call your header, begin the post query and then call your sidebar and footer, if needed. Here is an example of my custom page template, you can basically copy/pase this into your own file. It doesn't matter what you name it, as long as it's something.php and then upload it to your theme directory.


<?php
/*
Template Name: YOUR PAGE THEME NAME
*/
?>
<?php get_header(); ?>
<div id="container" class="one-column">
<div id="content" role="main">
<div id="YOUR STYLE DIV (not mandatory)">
<h3 align="center"> YOUR PAGE TITLE </h3>
<?php 
$args = array( 'post_type' => 'YOUR CUSTOM POST TYPE SLUG', 'numberposts' => -1 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php endforeach; ?>
</div>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar();?>
<?php get_footer(); ?>

  1. With the dirty work out of the way, just go ahead and create a new WP page, title it "Computer Guides" and then select your new page template in the drop box to the right. Hit publish and view the page to make sure nothing weird has happened.

  2. Next go ahead and click "Add Computer Guide" on the left admin panel, which should have showed up when you created your post type. Type in the guide, and hit publish. The new guide should show up as an excerpt on your "Computer Guides" page, when a user clicks the title they will be taken to the full post.

I believe the answer above me would also work and be easier, this is how I set mine up because it was nicer for the end-user to work with. Very clear on where to post a new "Computer Guide" for instance, also separates the content rather nicely.

The downside to this method in your case might be that you would have to create a few post types and a few templates to accommodate whatever sub-categories you might have. I think the extra work is worth it to be able to have all of your posts organized on the dashboard as well as the front-end, and have them in an excerpt list instead of a long pagination.

Good luck :)

share|improve this answer
add comment

Creating a parent category called "Guides" with two children categories "Computers" and "Internet" would do what you wanted. Just create the categories and add the parent category in the Nav Menu. The rest would work automatically.

share|improve this answer
    
How will you add the category to the Nav Menu? I am really struggling to do this... –  Filuren Jan 15 '11 at 13:56
add comment

what you are looking for are SUB-CATEGORIES, under the category guide create a sub categories named "Computers and Internet" then create a post and instead of tagging it "Computers and Internet" just set it in the sub category named Computers and Internet. that way you will get a page with all the guides filed under Computers and Internet

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.