-
Notifications
You must be signed in to change notification settings - Fork 30
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
Added block pattern for Podcast Grid #214
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.
@mehul0810 thank you for adding this block pattern.
The code looks good, but still require a few improvements.
Right now the new pattern will contain all posts by default. We could potentially filter the Query Loop block by podcasting taxonomy to only include posts which have a podcast. I suppose adding all podcasts by default will work, "taxQuery":{"podcasting_podcasts":[42,43,44]}
. The user could reduce the list of podcasts if they want.
Episode and Listening Time blocks expected to be added within the current PR, as well as the cover image for each podcast.
includes/block-patterns.php
Outdated
array( | ||
'title' => __( 'Podcast Grid', 'simple-podcasting' ), | ||
'description' => _x( 'Podcast Grid', 'This block pattern is used to display podcast in a grid structure.', 'simple-podcasting' ), | ||
'content' => '<!-- wp:query {"queryId":14,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false},"displayLayout":{"type":"flex","columns":3}} --> |
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.
The queryId
property probably needs to be removed here, it will be auto-assigned in the block editor once added.
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.
I made some changes:
- Use podcast terms for query
- Remove query ID
- Adds podcast name
- Use cover block featured image
- Change category for the pattern to query (included in core)
Without building a custom block for it, listening time is not possible with existing core blocks.
@nateconley is there more work here or can this proceed for review? |
@jeffpaul This can proceed for review if the listening time is okay to omit. |
@vikrampm1 mind opening a follow-on issue for someone to look into adding the listening time bit? |
Description of the Change
Added a block pattern for Podcast Grid with the help of Query Block. The figma design attached has Episode and Listening time for which we need to develop those custom blocks to support it.
Closes #84
Alternate Designs
Possible Drawbacks
Verification Process
Checklist:
Changelog Entry
Credits
Props @