Alphabeticalisation of Archive Titles?
-
I used to use Custom Query String by Matt Reader to list my archives A-Z And to change the amount of posts displayed. Its now not working anymore to alphabetise my archive post categories.
Eg https://www.mouthwateringmunchies.com/?cat=101
I have googled for over 4 hours trying various fixes & plugins but still can’t get anything to work. So here is me giving in and hoping someone here has a fix.
This is the code on my Archive php – I’m using the Magazine shack theme.
<?php get_header(); ?> <div id="content"> <div id="content2"> <?php if (have_posts()) : ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h3 class="arc">Archive for the ‘<?php single_cat_title(); ?>’ Category</h3> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h3 class="arc">Posts Tagged ‘<?php single_tag_title(); ?>’</h3> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h3 class="arc">Archive for <?php the_time('F jS, Y'); ?></h3> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h3 class="arc">Archive for <?php the_time('F, Y'); ?></h3> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h3 class="arc">Archive for <?php the_time('Y'); ?></h3> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h3 class="arc">Author Archive</h3> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h3 class="arc">Blog Archives</h3> <?php } ?> <?php while (have_posts()) : the_post(); ?> <!-- start entry post --> <div class="post"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </div> <!-- end entry post --> <?php endwhile; ?> <div class="navigation"> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div> <?php else : if ( is_category() ) { // If this is a category archive printf("<h2>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false)); } else if ( is_date() ) { // If this is a date archive echo("<h2>Sorry, but there aren't any posts with this date.</h2>"); } else if ( is_author() ) { // If this is a category archive $userdata = get_userdatabylogin(get_query_var('author_name')); printf("<h2>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name); } else { echo("<h2>No posts found.</h2>"); } get_search_form(); endif; ?> </div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Alphabeticalisation of Archive Titles?’ is closed to new replies.