Block Library: Add a Post Tags block.#19580
Conversation
| <a key={ tagId } href={ tag.link }> | ||
| { tag.name } | ||
| </a> | ||
| ); |
There was a problem hiding this comment.
I believe ultimately, we could offer a way to add/remove tags directly here. Let's land a readonly block first though.
youknowriad
left a comment
There was a problem hiding this comment.
Added "design feedback" tag for designers to start thinking about the potential of these blocks (style variations, styling...)
|
|
||
| export default function PostTagsEdit() { | ||
| if ( ! useEntityId( 'postType', 'post' ) ) { | ||
| return 'Post Tags Placeholder'; |
Fixed.
It won't render anything. |
|
High level thought: should the block be called |
|
That makes more sense now that we have variations. |
|
Can we merge this scaffold to avoid more merge conflicts in the shared files? |
f4d9750 to
abc53bc
Compare
|
Rebased. |
|
Size Change: +222 B (0%) Total Size: 864 kB
ℹ️ View Unchanged
|
ockham
left a comment
There was a problem hiding this comment.
Left a few minor notes and one question, but overall good to merge 👍
| if ( ! empty( $post_tags ) ) { | ||
| $output = ''; | ||
| foreach ( $post_tags as $tag ) { | ||
| $output .= '<a href="' . get_tag_link( $tag->term_id ) . '">' . $tag->name . '</a>' . ' | '; |
There was a problem hiding this comment.
We should get to a point where we support the common customization the theme function tags offer: https://codex.wordpress.org/Function_Reference/the_tags

Description
This PR adds a new Post Tags block akin to the Post Title and Post Content blocks.
How has this been tested?
Types of Changes
New Feature: There is a new Post Tags block for template building.
Checklist: