Querying by post category slug with core/query block markup

You should not modify the taxQuery value, or that it should always be in the form of {“<taxonomy>”:[<term IDs>],”<taxonomy>”:[<term IDs>],”<taxonomy>”:[<term IDs>],…}. But you can add custom arguments, so “categoryName”:”news” is good. And then you can use the query_loop_block_query_vars filter to add the category slug to the WP_Query arguments coming from the Query Loop block. Here’s … Read more

Only show read more text when when wp:post-excerpt meets excerptLength

To override the behavior of the render_block_core_post_excerpt function in a Block Theme, especially to customize the “Read More” link behavior based on the excerptLength, you’ll need to unregister the original block and register your own customized version of it. This process involves a few steps: Deregister the Original Block: You need to deregister the original … Read more