Navigation Link: Add showForLoggedInOnly attribute for visibility#70659
Navigation Link: Add showForLoggedInOnly attribute for visibility#70659prasadkarmalkar wants to merge 2 commits intoWordPress:trunkfrom
showForLoggedInOnly attribute for visibility#70659Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
t-hamano
left a comment
There was a problem hiding this comment.
@prasadkarmalkar Sorry for the late reply.
In fact, we are working on hiding blocks based on screen size, and we may implement additional functionality in the future to conditionally render blocks. See #72502 (comment) for more details.
Given that, it may not be desirable to implement certain conditional rendering functions on certain blocks.
I'd like to close this issue, but thank you for your efforts!
What?
Closes #70605
Add a checkbox to show the navigation link to only logged in user.
Why?
Currently, there is no built-in way to add conditions to menus, such as displaying different menu items when a user is logged in or logged out.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2025-07-09.at.1.12.30.PM.mov