Specific blocked content message per use
-
Hi there, I have used the php version of the shortcode to hide some content in my theme files and it works great. However I am wondering how to display a custom message for each use of the tag. For example I want one area to say “You must log in to send a message”, and another area say, “This content is locked”.
This is what I used to hide the content:
<?php if ( current_user_can( 'message_agent' ) ) : ?> all my content <?php endif; ?>How can I add a specific message to people using this format? Also, the default message does not show up either in place of the content for some reason.
Any help is appreciated, thank you.
The topic ‘Specific blocked content message per use’ is closed to new replies.