Timeline for How to hide an item from a menu to logged out users (without a plugin)
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 9, 2023 at 0:22 | comment | added | user75665 | This is crap. Any script kiddie can then still see your menu. | |
S Mar 4, 2021 at 13:23 | history | suggested | Alexander Holsgrove | CC BY-SA 4.0 |
Added missing opening PHP tag
|
Mar 4, 2021 at 11:16 | comment | added | Alexander Holsgrove | For anyone thinking of using this, please don't. Use the proper menu hooks as per @chrisguitarguy answer. | |
Mar 4, 2021 at 11:15 | review | Suggested edits | |||
S Mar 4, 2021 at 13:23 | |||||
Aug 8, 2016 at 5:53 | vote | accept | Iqbal Mahmud | ||
Jul 31, 2016 at 12:03 | comment | added | kaiser |
This means that you are (a) querying unnecessary data and (b) is non-reversible for child themes or plugins. You might want to at least use a callback attached to wp_head or properly register and enqueue styles. While then it would be a somehow ok solution, it would still be preferable to just conditionally switch those items off before querying the items from the DB.
|
|
Jul 31, 2016 at 12:01 | history | edited | kaiser | CC BY-SA 3.0 |
Fix Markup
|
Jul 31, 2016 at 11:07 | history | answered | MD Sultan Nasir Uddin | CC BY-SA 3.0 |