The code examples in the other thread need to be added to your theme (or child theme)’s functions.php
file. The code examples in that thread, when added to your functions.php file will tell the plugin what to class as indexable when it appears as the first letter in a title.
The first block of code shows how to add numbers to the end of your list page when it is built; each number will be a separate category. The return
in the function
in that first block sends the text after it (in PHP plain text needs to be enclosed in quotes '
or "
). The text is expected to be a list of letters separated by commas ,
where each group contains all the letters that should be listed in that section of the listing. The block there takes the original list that we call $alphabet
and adds the extra groups onto the end in the line that begins with return
:
add_filter( 'a-z-listing-alphabet', 'your_alphabet_filter' );
function your_alphaber_filter( $alphabet ) {
return $alphabet . ',1,2,3,4,5,6,7,8,9,0';
}
For reference, the default grouping is similar to Aa,Bb,Cc....Xx,Yy,Zz
which will list each alphabet letter separately but groups upper and lowercase letters of the same name together. i.e. A
and a
need to both be specified because to a computer they are different letters but in language they are the same, so we put them together in the same group. The first letter in each group, remember that the groups are separated by commas ,
, is used as the title for that group when shown on the page, i.e. A
, B
, C
, etc.