-
Notifications
You must be signed in to change notification settings - Fork 313
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
Show Facet widgets on taxonomy archives #2837
Conversation
@burhandodhy PHP linting found a problem in the code. Do you mind addressing it and then assigning the PR back to be for review? I think we might be being too simplistic in that new list of checks but I can check that later. |
@felipeelia liniting issues are fixed. For the check, I replicate the same behaviour which we have before. |
Are you sure that
behaves the same way
does? Going to an author archive, just as an example, the code seems to have different behaviors. Also, it is not needed to check if |
@felipeelia thanks for pointing out the author archive page. I totally missed out that case. I updated the check. |
|| ( is_home() && empty( $query->get( 'page_id' ) ) ) ) | ||
) { | ||
return false; | ||
|| $query->is_tax() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@burhandodhy let's try to pass get_facetable_taxonomies()
here (and possibly also get rid of is_tag() and is_category())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felipeelia I tried, but is_tax
doesn't work for the built-in taxonomy page. We don't have any other option other than manually check every page.
Whether the query is for an existing custom taxonomy archive page. True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
source
Refactor code
Description of the Change
This PR adds the ability to show the Facet widgets on the taxonomy archives.
Closes #2808
Verification Process
Changelog Entry
Fixed: Show Facet widgets on taxonomy archives
Credits
Props @burhandodhy