Automattic / newspack-blocks

Gutenberg blocks for the Newspack project.
207 stars 43 forks source link

Blog Posts Block: Add option for CPT (custom post types) #522

Closed pauljacobson closed 3 years ago

pauljacobson commented 4 years ago

Currently we need to use the Portfolio Shortcode to display Portfolio projects on a post or page. The shortcode is pretty clunky, especially when compared to the Blog Posts Block.

What about adapting the Blog Posts Block to display Portfolio projects instead?

So just as the Blog Posts Block enables users to display their posts based on various parameters using a set of layout options, how about creating a version of that block for Portfolio projects too?

Options in the Blog Posts Block could be perfect for this use case. For example, like this:

Screenshot direct link: https://d.pr/i/6LmM1S/hNZ3YpUKVQ

This may be related to Automattic/wp-calypso#37782

lancewillett commented 4 years ago

Internal ref: pbg9X-epS-p2 CC @ianstewart

supernovia commented 4 years ago

Just ran across this -- noting it'd be nice if this block supported pages and testimonials too. :)

mrfoxtalbot commented 4 years ago

I think that all post-loop blocks should support all CPTs, as a rule of thumb.

davipontesblog commented 4 years ago

I am moving this as a feature request on the newspack-blocks repo to be considered for WordPress.com.

benmay commented 4 years ago

Same issue. Would be happy to do this via a filter, if that is acceptable happy to do a PR.

laurelfulford commented 4 years ago

We've been discussing this option from a Newspack perspective; Newpack already includes a custom post type for Newsletters, and additional ones like Listings and Podcasts are potentially in the works. Those, on top of pages, would be very handy to be able to show on the front-end.

On the flip side, we also have a bunch of CPTs, like for sponsors and campaigns, that we wouldn't want to show, or even have available to pick. I'm sure there are other CPTs out there that wouldn't be appropriate to show in this block.

Based on this:

Some considerations:

matticbot commented 3 years ago

:tada: This issue has been resolved in version 1.18.1-alpha.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

matticbot commented 3 years ago

:tada: This issue has been resolved in version 1.18.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: