Restrict Anonymous Access


This plugin helps you to hide certain parts of your content like a paragraph or an image etc. to logged-out users or users of any other role with just a simple shortcode.

Customize the shortcode in order to display a special note to your users, apply custom CSS classes for your own design or hide the restricted parts completely.


  • text within shortcode [member][/member] is not visible to anonymous users
  • hide content based on user roles (subscriber, contributor, author, editor, admin)
  • restricted text can be replaced with info text box
  • info text can be customized
  • comes with a handy TinyMCE button for quick access


  • Inserted the shortcode in WordPress content editor.
  • Front-end view with anonymous user, content is hidden and info message shown instead.
  • Front-end view with logged-in user, content is shown.


  1. Upload the plugin files to the /wp-content/plugins/restrict-anonymous-access directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Use the shortcode [member][/member] in any post, page or custom post type in order to hide content from anonymous users. Important: Please use “Classic” block element if you are using Gutenberg.
  4. Optional parameters are showinfo="0" to hide the info message, infotext="Your custom info for anons." and class="my-custom-css-class" for adding CSS class to the info box.
  5. Use parameter role="[subscriber|contributor|author|editor|admin|your-custom-role]", e.g. role="editor" to hide content from users below editor capabilities.


2018년 6월 12일
First I tried several plugins that are supposed to do the same thing. They did but hard to use or changed content inside the shortcode. Just got tired of messing around with it. I thought I could do an easy check on if the user was logged in and display data if he was. Well that theory is easier said than done. This programmer did a great job. Kept it simple but can give some quite complex results. Perfect and should be allowed into core, IMHO. Keep up the good work. I'll be using this in every website I create.
2017년 7월 25일
I quite like this plugin; does what it says; is lightweight and not overloaded; easy to handle; no integration in the menue structure but no need for it. I was exactly looking for something like that an I am not disappointed. Thanks! 5 Stars from me! fregatte
모든 3 평가 읽기

기여자 & 개발자

“Restrict Anonymous Access”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.


자국어로 “Restrict Anonymous Access”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.



  • Added compatibility to custom user roles.
  • Added HTML support for infotext parameter.


  • Added optional user role based content restriction.


  • Tested with WordPress 4.8.
  • Fixed: Text output with paragraph tag (wpautop).


  • Initial release for WordPress plugin directory.