0

I'm using a self-hosted WordPress site with a Child Theme of Twenty Thirteen. After I requested the same question in the above title, the Child Theme's Developer suggested that I come here and attempt to create a new plugin to accomplish my goal.

Isn't there an easier way to simply Copy & Paste some altered code from the Parent Theme into the Child Theme instead of creating or using a current plugin?

Here's a link to my Child Theme's homepage which uses a Masonry Layout: https://shapeshifter3.com/

1 Answer 1

3

You could use the filter term_links-post_tag to sort tags while ignoring their case:

add_filter( "term_links-post_tag", 'themeslug_sort_tags_alphabetically' );

function themeslug_sort_tags_alphabetically( $tags ){
    natcasesort( $tags );
    return $tags;
}

This code is to be placed in the functions.php of the child theme.

2
  • 2
    If the answer worked for you, the best thank you is to accept it (click the check mark under the vote arrows on the left), and once you have enough reputation, you can also vote up answers that are helpful.
    – Gabriel
    Nov 27, 2015 at 6:21
  • I did the upvoting for you, because this is probably the best way to do this. ;-)
    – flomei
    Nov 27, 2015 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.