I noticed an issue here when trying to conditionally display the date based on $post->post_type - the $post variable isn't available. I'd have just used functional equivalents but $post->ID is already utilised on the page and results in an incomplete <article> block ID property.
We need to decide whether to use global $post in the builder/block or get_the_ID() in the article ID property.
I noticed an issue here when trying to conditionally display the date based on
$post->post_type
- the $post variable isn't available. I'd have just used functional equivalents but$post->ID
is already utilised on the page and results in an incomplete<article>
block ID property.We need to decide whether to use
global $post
in the builder/block orget_the_ID()
in the article ID property.