How to create a Wordpress archive page for custom posts and taxonomies?

I am trying to customize an archive page with custom message types and custom taxonomy in Wordpress.

I created a custom post type: "package" and a custom taxonomy: "software." My problem is that when I try to look at localhost: 8888 / software / aperture, I get all messages of type type instead of those that have selective adiabatic taxonomy selected. I am using the following code:

<?php
        $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
        ?>
        <h1><?php echo $term->name;?> Presets</h1>
        <div class="intro2">
            <p>
            <?php echo $term->description;?>
            </p>
        </div>
        <?php query_posts('post_type=package'); ?>
         <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <!-- Product Start -->
            <div class="product">
                <div class="product_top"></div>
                <div class="product_content">
                        <div class="product_image">
                        <a href="<?php the_permalink()?>">
                            <?php echo get_the_post_thumbnail( $id, $size, $attr ); ?> 
                        </div>
                        <a href="<?php the_permalink()?>" class="title"><?php the_title()?></a>
                            <?php the_excerpt()?>                   
                        <div class="theprice">
                            <?php
                            $price = get_post_meta($post->ID, "price", true);
                            echo "$".$price;
                            ?>
                        </div>
                        <a href="<?php the_permalink()?>" class="button calltoaction"><span>See The Presets</span></a>
                        <div class="clearboth"></div>
                </div>
            </div>
         <?php endwhile; else: ?>
         <p>Sorry, no posts matched your criteria.</p>
         <?php endif; ?>    

How do I get this archive page to just show package type messages from the currently selected item in a custom taxonomy?

By the way, I used the "Extra Types" and "More Taxonomy" plugins to customize it.

: :

, , true . : <?php query_posts(array( 'post_type'=>'package', 'presets' => $term->slug, 'posts_per_page' => -1 )); ?>

+5
1

<?php query_posts('post_type=package'); ?>

<?php query_posts(array('post_type'=> 'package',array('taxonomy' => 'software'))); ?>

or

<?php query_posts(array('post_type'=> 'package','taxonomy' => 'software')); ?>
+1

All Articles