Oct
12

Hi,

Many wordpress users wants to leave private notes on specific posts on their blog which can be only visible by blog admin. In order to do that you need to add this code in functions.php file of your blog:

add_shortcode( ‘note’, ’sc_note’ );

function sc_note( $atts, $content = null ) {
if ( current_user_can( ‘publish_posts’ ) )
return ‘<div>’.$content.’</div>’;
return ”;
}

Now, add this code in the post for which you need to leave the private notes:

[note]
This is a personal note which has added by the blog admin!
[/note]

That’s it!

Thanks,

Shane G.

Popularity: 1%

Related posts:
  1. How To Add Private Pages In Navigation Menu Of Wordpress Blog Hi, If you are using private pages and want to...
  2. How to keep your post private? By making your post private, your post will be visible...
  3. Buddypress Private Messaging Buddypress Private Messaging BuddyPress private messaging works like internal site...
  4. Plugin: Wp Private Access Hi, WP Private Access adds an http authentication dialog using...
  5. How To Disable Please Update Now Message In Wordpress Dashboard Hi, When a new version of Wordpress is available, update...

Leave a Reply

You must be logged in to post a comment.