i’m trying to achieve the same goal, tried this:
add_filter( 'a_z_listing_item_index_letter', 'ignore_the_in_a_z');
function ignore_the_in_a_z( $indices, $item, $item_type ) {
$title = get_the_title( $item );
for ( $i = 0; $i < strlen( $title ); $i++ ) {
$first = substr( $title, $i, 4 );
switch ( $first ) {
case 'the ':
print_r ($first):
break;
default:
return [ $first ];
}
}
return $indices;
}
but no luck, it ended up in everything being listed in the “special character” category… any help?