Skip to content

Instantly share code, notes, and snippets.

@mrwweb
Created November 28, 2015 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrwweb/188281c2f71e2f21088a to your computer and use it in GitHub Desktop.
Save mrwweb/188281c2f71e2f21088a to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: A-Z the Tags
Description: Alphabetize the list of tag links
Version: 1.0
Plugin URL: http://wordpress.stackexchange.com/questions/144703/wordpress-the-tags-not-in-alphabetical-order
*/
add_filter( 'term_links-post_tag', 'aztt_sort_tags_alphabetically' );
function aztt_sort_tags_alphabetically( $tags ){
natcasesort( $tags );
return $tags;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment