Skip to content

How to check if on page 1 (not page 2, 3, etc) when rendering a block #65684

Answered by pshemek
realthemes asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, looking at the way the Post Template block (https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/post-template/index.php) is rendered, I think you can use the “render_block” filter for your block type and derive the query context in a similar way this block does.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@realthemes
Comment options

Answer selected by realthemes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants