Revision 184 is a pre-publication revision. (Viewing current revision instead.)

Restrict a page/post to a specific logged in user

[php] if ( is_user_logged_in() && is_author('Alan') ) { show content here } else { show error message }[/php]

Revisions

  • May 4, 2012 @ 02:00:27 [Current Revision] by PeterLugg
  • May 4, 2012 @ 02:00:01 by PeterLugg
  • May 4, 2012 @ 01:59:43 by PeterLugg

Revision Differences

May 4, 2012 @ 01:59:43Current Revision
Content
 Added: [php]
 Added: if ( is_user_logged_in() && is_author('Alan') )
Deleted: Added: {
 Added: show content here
 Added: } else {
 Added: show error message
 Added: }[/php]

Note: Spaces may be added to comparison text to allow better line wrapping.

Tags: ,

No comments yet.

Leave a Reply