[memb_can_view_post]

This Applies to

Summary

This shortcode displays content based on the permissions of the specified post or page.

Shortcode Examples

Simple Example

[memb_can_view_post postid=172] You can view this post [/memb_can_view_post]

Example with Alternate Ouput

[memb_can_view_post postid=172]
   Yay! you can view that page!
[else_memb_can_view_post]
   Nope. Sorry. You can't look at that.
[/memb_can_view_post]

can_view_1

[memb_can_view_post postid=180]
   Yay! you can view that page!
[else_memb_can_view_post]
   Nope. Sorry. You can't look at that.
[/memb_can_view_post]

can_view_2

Here’s how you can get the postid:

wp postid

 

Shortcode Parameters​

postid: The id of the specific post.

Shortcode Attributes

Conditional: Yes (?)
Nestable: Yes (?)
Accepts formatting: No (?)
Capturable: No (?)

Additional Information

You can read this article to know how [memb_can_view_post] shortcode can be used to create a grid of images that are in full color, or are ghosted gray depending on your access to each item in the grid.

  • Was this Helpful?
  • YesNo
9 ways to add more value to your membership site

[memb_can_view_post]

This Applies To

Book a Call

Welcome to Memberium!

We are very excited for you to be part of our family. 

We would love to answer any questions that you have!

Please choose the best time for you to get in a call with us. 

For Technical Support, you can contact us at https://memberium.com/support/ or Email us at support@memberium.com.