/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//FUNCTION.PHP function member_check_shortcode($atts, $content = null) { return $content; } else { return 'Sorry, this part is only available to our members. Click here to become a member!'; } add_shortcode('member', 'member_check_shortcode'); //add the following to your posts to create a section or text (or any other content) that will be displayed only to registered users: [member] This text will be displayed only to registered users. [/member]