✓ Free ⭐ Premium
Church Admin provides two shortcodes that let you show different content to logged-in and logged-out visitors on the same page. This is useful for protecting sensitive information like the member directory or the schedule, while still giving non-logged-in visitors something to see — such as a login prompt or an explanation of how to get access.
The two shortcodes
Content for logged-out visitors
Wrap content in this shortcode to show it only to visitors who are not logged in:
[church_admin type="not-logged-in" login_form=1]
Content shown to visitors who are not logged in goes here.
[/church_admin]
The login_form=1 parameter appends a login form directly below your content, so visitors can log in without being sent to a separate page. You can remove login_form=1 if you’d prefer not to show the form.
Content for logged-in members
Wrap content in this shortcode to show it only to visitors who are logged in:
[church_admin type="logged-in"]
Content shown only to logged-in users goes here.
[/church_admin]
Restricting to specific member types
You can go further and restrict the logged-in content to specific member types — for example showing certain content only to full members, or only to small group leaders. Add the member_type_id parameter with a comma-separated list of member type IDs:
[church_admin type="logged-in" member_type_id="1,2,3"]
Content shown only to members with type ID 1, 2, or 3.
[/church_admin]
To find your member type IDs, go to Church Admin → People → Member types. The ID for each type is shown in the URL when you click to edit it — for example member_type_id=2 in the browser address bar.
When you do not need it!
The shortcodes and blocks that show personal data default to login only for security.
Practical examples
- Schedule page — show a login prompt to visitors, and the personal rota shortcode to logged-in members
- Members-only notices — embed a block of text or announcements on any page that only logged-in members will see, without making a separate page for it
- Role-specific content — use
member_type_idto show different content to different groups on the same page, for example a section visible only to small group leaders
Using the Gutenberg block
If you prefer not to type shortcodes directly, search for Church Admin in the Gutenberg block inserter and look for the logged-in and not-logged-in block options. These provide the same functionality without needing to write the shortcode by hand.