$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>plugins - Members-only page, but accessible via sharable link|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

plugins - Members-only page, but accessible via sharable link

matteradmin9PV0评论

Our site has a lot of members-only content, but we would like to allow our members to share certain content with non-members. Is there a way to generate sharable links that would allow non-members to access this restricted content?

Our site has a lot of members-only content, but we would like to allow our members to share certain content with non-members. Is there a way to generate sharable links that would allow non-members to access this restricted content?

Share Improve this question asked Jan 8, 2019 at 20:02 Matt PeabodyMatt Peabody 11 bronze badge 2
  • 1 I don't think you have provided enough info for anyone to accurately answer your question. How this members only content locked down? Assuming you are using a plugin for this? – RiddleMeThis Commented Jan 8, 2019 at 21:20
  • @RiddleMeThis This content is locked down to our "users". When someone signs up, they are added to our users. No plugin is used. We can elect to "Make Public" certain pages, but then it's open to everyone. We're trying to keep everything private, but allow access with a sharable link. – Matt Peabody Commented Jan 9, 2019 at 13:07
Add a comment  | 

1 Answer 1

Reset to default 0

Can be done easily with a shortcode:

[members-only]...content...[/members-only]

The shortcode will return content for members, or text '<h3>This is for members only!</h3>', for non member request. The callback function of the shortcode will check who made a request, and return display data accordingly. Any other text on page/post will be displayed as is. For more info about shortcodes see: Shotcodes API

Post a comment

comment list (0)

  1. No comments so far