-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: feature extensions from gdg #120
Conversation
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.
Working as described!
A few questions/suggestions:
- With listing archives disabled, a category assigned only to listing posts does not display content. Is this expected behavior? I'd expect that this type of category would display content regardless of my listing archive options.
- Why are listing archives disabled by default?
- I suggest the archive options to be higher up on the page, right below the permalink inputs
@miguelpeixe Great questions! Maybe we can talk through the best possible solution here. 😄
I'll start with this question. Back when we first released v1, we decided to make listing CPTs use regular post categories and tags instead of custom taxonomies. This was intended to make it easier to cross-reference listings and posts as related content. For the sites that are using Listings in production (admittedly few at the moment), if any are assigning the same categories and tags to listings and posts, enabling listing archives by default would cause post archives for those sites to start displaying listings intemixed with posts. Making it an opt-in feature should help avoid any unexpected behavior. An alternative idea would be to enable listing archives by default, and post a very visible/urgent notice of breaking changes with the next release. 🙂
So, this is a side effect of that decision to use post categories and tags. When viewing a category or tag term archive, WP doesn't really know whether the category or tag contains only listings. If listings aren't able to be shown in archives, then a category that contains only listings will indeed return 0 results. A category that contains both posts and listings will show the posts only. This does seem kind of wrong from a user perspective, but it's technically correct behavior, and I'm not sure of a better way to handle it. This is also status quo right now in the current release. Do you have an idea of how we might make this a bit less opaque to readers?
Good idea! Updated in e7663b8. |
Thank you for the thorough explanations!
I can see a world where we'd have post type archive enabled but not necessarily categories. Can the "archive" option be divided into two options?
With that approach, we could have post type archive enabled and categories disabled. It wouldn't cause a change in how their sites are currently displaying content. What do you think?
Makes sense, I just noticed that the strategy used on The only solution I can think of is restoring custom taxonomies and have them both available, which doesn't sound awesome to me but at the same makes listing category navigation possible without it necessarily having to interfere with articles navigation. I can file an issue so we can continue this discussion outside of this PR.
Thanks! |
I like this idea—thanks for the suggestion! Implemented in 26d5710. |
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.
Thank you for revising!
# [2.5.0-alpha.2](v2.5.0-alpha.1...v2.5.0-alpha.2) (2021-09-21) ### Bug Fixes * editor crash when switching months in event dates block ([#123](#123)) ([cee0d53](cee0d53)) * fatal error when WooCommerce Subscriptions is not active ([#122](#122)) ([16ac166](16ac166)) ### Features * feature extensions from gdg ([#120](#120)) ([b2c3cc8](b2c3cc8))
🎉 This PR is included in version 2.5.0-alpha.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [2.5.0](v2.4.0...v2.5.0) (2021-09-21) ### Bug Fixes * editor crash when switching months in event dates block ([#123](#123)) ([cee0d53](cee0d53)) * fatal error when WooCommerce Subscriptions is not active ([#122](#122)) ([16ac166](16ac166)) ### Features * feature extensions from gdg ([#120](#120)) ([b2c3cc8](b2c3cc8)) * **ugc:** automated WC products for self-serve listings ([#117](#117)) ([6a44d86](6a44d86))
🎉 This PR is included in version 2.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Ports some of the lower-risk feature enhancements developed for GDG back into the main Listings plugin. These new features are gated behind new settings so that sites that are already using Listings won't see any unexpected behavior.
I'd also like to port the "featured listing" functionality from GDG, but I'm awaiting some feedback on https://github.com/Automattic/newspack-gdg/issues/1 before we do so as it may impact performance in the current state.
How to test the changes in this Pull Request:
Yoast primary categories
Listing archives
/listings/places/
). Confirm that these now work as well.Other information: