Ignoring articles such as "The" and "A" when sorting alphabetically

Posted in: Newspaper
Post count: 2

I’m currently using the Alphabetical (A->Z) sort order filter on some of my flex blocks, however my issue is with sorting pages that begin with articles such as “The” or “A”, which I would like to ignore.

Example:

Alphabet
A Zoo in the Woods
Binoculars
Graffiti
The Dark Knight

(I would like it to be sorted like this)

Alphabet
Binoculars
The Dark Knight
Graffiti
A Zoo in the Woods

I’m still pretty new when it comes to coding / wordpress, so would appreciate any specific assistance on how to address the problem.

It wouldn’t be too big of an issue if I have to add a custom field on all those pages. with a canonical title for sorting that doesn’t include the “The” or “A” initial articles, I just don’t know where/how I would implement such a change within the theme.

Thanks for any guidance you might be able to offer.

Post count: 21065

Hello!

Unfortunately, there is no setting in our theme in order to change that alphabetical order in the way you want.

You can implement this in the file: td-composer/legacy/common/wp_booster/td_data_source.php 217 line.
But, please note that any change you make in the files after update will be overwritten and you have to make the changes again. Better save the code somewhere and then apply it again after update.

Hope that helps you somehow!

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.