How to restrict gutenberg block next post & previous post to same category? #47107
Unanswered
laoyingzhige
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using gutenberg default blocks [next post]&[previous post] in the template.
The theme is Twenty Twenty-Three.
but,
How to restrict the post navigation to the same category ?
In gutenberg editor, it don’t have the parameters to set to restrict post navigation to the same category.
I am thinking…..
Can I change the block [next post] & [previous post] default parameter [$in_same_term = false] to [$in_same_term = true] ?
like this:
————
————
So, In the function.php,
how to write the code to change the default block parameter [$in_same_term = false] to [$in_same_term = true] ?
Do you know, friends?
Thanks very much.
Beta Was this translation helpful? Give feedback.
All reactions