My suggestion: First, see the Codex on setting up templates for individual categories:
http://codex.wordpress.org/Category_Templates#What_Template_is_Used_to_Display_a_Particular_Category.3F
(Edit: Need to look closer at forum posts…)
Next, look into creating a custom Loop, using query_posts()
, for the categories that will be organized alphabetically. A couple good articles for this:
http://www.ifelse.co.uk/archives/2005/03/31/query_posts/
http://www.ifelse.co.uk/archives/2005/04/08/query_posts-redux/
andreInLA:
ideally, you’d want to make a plugin that changes the wordpress loop’s query. however, a critical plugin hook is missing to meet your requirements (i.e. you cannot select CASE to differentiate posts based on category), so you’ll need to apply filters to the_posts:
function trash_the_loop( $posts_where )
{
return ” AND 1 = 0 “;
}
add_filter(‘posts_where’, ‘trash_the_loop’, 1000);
function redo_query($posts);
{
global $wpdb;
return $wpdb->get_results(“/* query your way */”);
}
add_filter(‘the_posts’,’redo_query’);
@denis
The plugin solution may be overkill, as one can query posts based on the criteria of title (or date, or other) order using individual category templates, or by testing the category one is in with in_category(). Then The Loop in “profiles” can be initiated with:
query_posts("category_name=profiles&orderby=title&order=ASC");
To list all posts on the page, one need only insert an overly large number with the posts_per_page argument:
&posts_per_page=1000
Alternatively, pagination of posts (joined with posts_nav_link() or a ‘paged links’ plugin), can be handled by collecting the paged query:
$page = get_query_var('paged');
and the query_posts addition:
&posts_per_page=$posts_per_page&paged=$page
Here’s what worked:
added line: query_posts(‘orderby=title&order=ASC’);
if (have_posts()) : ?>