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

post_tag Filter not working #92

Open
davidmondok opened this issue Mar 30, 2023 · 1 comment
Open

post_tag Filter not working #92

davidmondok opened this issue Mar 30, 2023 · 1 comment

Comments

@davidmondok
Copy link

When I add post_tag taxonomy support to a custom post type via ->taxonomy("post_tag") a select filter will automatically be added to that post types edit.php All Posts dashboard page.

However, the filter doesn't work. This only happens specifically for Wordpress's post_tag taxonomy. Select filters for all custom taxonomies work as expected.

Maybe you/someone has a quick answer or idea, why this is happening. But I'll try to find the time to debug this issue otherwise. Thanks :)

PHP Version: 7.4
WordPress: 6.1.1
jjgrainger/posttypes: 2.2

@jjgrainger
Copy link
Owner

Thanks @davidmondok

I believe the issue is caused by using the taxonomy name post_tag for the field name (PostType.php#L430), when the query var needed is tag.

I was working on a fix but making the changes needed here caused another issue where the filtering did not work with other taxonomies. I need to investigate this further.

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