Getting a little of the problem with Wordpress here. In most honesty I have always designed my sites on your own and "coded" in the ground-up. Recently I have been trying to utilize Wordpress as I have heard advantages to it.

It appears that Wordpress provides you with a lot of things free of charge (e.g. dynamic "pages" according to Groups). However, I must understand how to manipulate these giveaways without reinventing the wheel. For instance, I must have my SUB-MENU display a listing of publish groups. But I must sort individuals groups with a CUSTOM Area.

Now, I possibly could reinvent the wheel and by hand create (and connect to) a brand new page for every sort, the like and so on, (that we don't essentially mind doing) however, I am wishing there's a means for this via plug ins or else. I have seen several lessons on custom queries, however they stop lacking implementation -- they just provide the query without telling exactly whether to produce a new page or plug it right into a function somewhere.

Any input could be most appreciated.


Towards the top of category.php template inside your theme's root directory, add the next to include your custom sort area towards the query:

function is_valid_custom_sort_field($field)
    // implementation left as an exercise for the questioner
    return true;
if ($_REQUEST['sort_custom_field'] && is_valid_custom_sort_field($_REQUEST['sort_custom_field'])) {
    query_posts($query_string . '&orderby='.$_REQUEST['sort_custom_field']);


In case your theme does not possess a category.php, this is a simple default template to base it on (replicated in the incorporated twentyten theme):

 * The template for displaying Category Archive pages.

get_header(); ?>

        <div id="container">
            <div id="content" role="main">

                <h1 class="page-title"><?php
                    printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
                    $category_description = category_description();
                    if ( ! empty( $category_description ) )
                        echo '<div class="archive-meta">' . $category_description . '</div>';

                /* Run the loop for the category page to output the posts.
                 * If you want to overload this in a child theme then include a file
                 * called loop-category.php and that will be used instead.
                get_template_part( 'loop', 'category' );

            </div><!-- #content -->
        </div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>