-
Notifications
You must be signed in to change notification settings - Fork 43
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: allow different post types in carousel; plus new block options #746
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.
Looks good, just a couple small things that need fixing (mostly the title attribute). Great idea with this feature, and thanks for the speedy implementation!
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.
Latest version works great!
# [1.25.0-alpha.1](v1.24.0...v1.25.0-alpha.1) (2021-05-04) ### Features * allow different post types in carousel; plus new block options ([#746](#746)) ([f30a5a5](f30a5a5))
🎉 This PR is included in version 1.25.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.25.0](v1.24.0...v1.25.0) (2021-05-05) ### Features * allow different post types in carousel; plus new block options ([#746](#746)) ([f30a5a5](f30a5a5))
🎉 This PR is included in version 1.25.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Makes a few changes:
newspack_blocks
support to be selected and added to a Posts Carousel, much like with the Homepage Posts block.imageFit
– Lets you specify whether the image is cropped to fill the slider or downsized to fit within it. The latter is useful for showing sponsor logos that you don't want to be visually cropped.showTitle
– Lets you show or hide the title. Now, if you toggle off all options under "Article Meta Settings", the meta container at the bottom of each slide with the translucent black background is not rendered at all, which should be useful if you want to show sponsor logos with no other information.You must have this change active in the Newspack Sponsors plugin if you want to test with the sponsor CPT: Automattic/newspack-sponsors#52
Closes #745.
How to test the changes in this Pull Request:
npm run build
to build files.Post Types options
newspack_blocks
to the post type, e.g.add_post_type_support( 'cpt_name', 'newspack_blocks' );
Specific Posts mode
Image Fit option
Show Title option
Sponsor links
Sponsor CPTs don't have working permalinks and are not viewable as public posts by themselves. They do, however, have a "Sponsor URL" meta field, so if this exists sponsor CPTs will link to that instead of the permalink in Post Carousel and Homepage Posts blocks.
Note: It's possible to create a sponsor without defining an external URL? In this situation, the blocks will fall back to the permalink, which will be broken. :\ If this turns out to be a problem I would say we should add a block attribute to not link any slides in the slideshow.
Other information: