PRIVATE CONTENT Shortcode adds/edits

Mahalo to Aldo Latino, author of the PRIVATE CONTENT plugin for the expertise!

Added to the style.css for my theme, I added:

/* private-content shortcode changing alt text color */
.alt-text {
color: #FFFFFF; /* white */

This makes any alt text in the shortcode show up as white font color. I changed the color to something other than white tho. Last choice is THIS SHADE OF BLUE.

Also, with guidance again from the plugin author, I added to the theme’s functions.php:

//* substitute image for blank in private shortcode */
function image_when_private_content_is_empty( $text ) {
$text = '';

return $text;
add_filter( 'ubn_private_text_empty', 'image_when_private_content_is_empty' );

This puts an image into the alt=” ” tag instead of relying on text or leaving blank. The image itself is stored in the same folder as the theme. Currently it is: restricted icon

Leave a Reply

Your email address will not be published.