mysociety / fixmyblock-wordpress

1 stars 1 forks source link

Select individual posts for ‘Post list’ block #32

Closed zarino closed 4 years ago

zarino commented 4 years ago

The ‘Post list’ block currently lets you filter the list of posts by category or tag.

We need a way to display specific posts in this block. (Right now we need this for the homepage, but it’s conceivable that we might want it for other pages in the future.)

I’d hoped we could do this using a "hidden" category or tag, but I turns out that public is an attribute of an entire taxonomy, not just a single term in a taxonomy, so we can’t easily prevent a specific term from appearing in—for example—tag lists across the rest of the site. Maybe we could find a plugin that lets us do this, but it feels like a fragile solution?

Another option is to use a CarbonFields association field in the block, that lets you pick individual pages, just like you can pick individual pages in the ‘Related items’ block. We’d need to work out whether this should go in a new block, or the existing “Post list” block.

zarino commented 4 years ago

I’ve just realised—d'uh!!—that a "Post list" block where you specify the exact posts you want to display, is just the "Related posts" block that we’ve already got.

So maybe we just use that on the homepage!

zarino commented 4 years ago

Yes, we can use the ‘Related items’ block for this.