Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting not working on single tem page #207

Open
Malin88 opened this issue Oct 4, 2022 · 1 comment
Open

Sorting not working on single tem page #207

Malin88 opened this issue Oct 4, 2022 · 1 comment

Comments

@Malin88
Copy link

Malin88 commented Oct 4, 2022

Hi,
I have CPT called team with taxonomy profession. Then, I added an ACF field sorting_name that I wanted to sort by, and the last step I added:

'site_sortables' => ['sorting_name' => array(
                'meta_key' => 'sorting_name',
                'default' => 'ASC',
            )],

On main archive page /team new sorting works fine, but when I go to any category of 'profession' eg. /profession/office the list of posts is sorting by title as it was before.

any suggestions how to fix this ?

@johnbillion
Copy link
Owner

Thanks for the report. Off the top of my head I'm pretty sure that sorting only applies to the main post type archive, not a term archive for the post type. Technically the term archive could include other post types.

It makes sense for this to apply to term archives too, though. Unfortunately I don't have any time to implement this at the moment nor any time soon, but PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants