Thanks!!!
* the blog I’m trying to edit is www.wildbasilliving.com
]]>Here’s the code in my category.php template:
<?php
remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'category_custom_loop');
function category_custom_loop() {
global $paged;
$cat = get_the_category();
$cat = $cat[0];
$args = array('category__in' => $cat->cat_ID, 'paged' => $paged, 'orderby' => 'title', 'order' => ASC);
$query_args = wp_parse_args($args);
genesis_custom_loop( $query_args );
}
genesis();
Appreciate your help. Thanks.
]]>$posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1');
It works like dream! All posts now are in alphabetical order.
However one thing has changed – pagination of posts. So in a given category I can see now one long list of all category posts, rather than lets 10 and link to ‘Older Posts’ and ‘Newer posts’. These links simply disappeared.
Any ideas how to alphabetize posts and keep the pagination?
regards,
Peter
Usisng the code found in Alphabetizing Posts https://codex.www.ads-software.com/Alphabetizing_Posts is it possible to ad variants to render it properly organized by last name?
]]>Usisng the code found in Alphabetizing Posts https://codex.www.ads-software.com/Alphabetizing_Posts is it possible to ad variants to render it properly organized by last name?
]]><?php
// we add this, to show all posts in our
// Glossary sorted alphabetically
if (is_category('Soldiers by Unit'))
{
$posts = query_posts($query_string .
'&orderby=title&order=asc&posts_per_page=-1');
}
// here comes The Loop!
if (have_posts()) : while (have_posts()) : the_post(); ?>
This works great but only for the category “Soldiers by Unit”. But subcategories are not alphabetized. And other parent categories (like “Soldiers by Surname”) are not alphabetized. How do I specify that it should alphabetize all posts for all categories (except for the category “frontpage” which I use for home page posts only)? Thanks for any help. I am just learning php.
]]>