Just encapsulate the content you want to show only to logged in users or or…
Simple Self Closing Shortcode Example
//self enclosing shortcode use as [subtitle class="css-class"]TEXT[/subtitle]
//https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress
function subtitle_link_att($atts, $content = null) {
$default = array(
'class' => '',
);
$a = shortcode_atts($default, $atts);
$content = do_shortcode($content);
return '<div class="'.($a['class']).'">'.$content.'</div>';
}
add_shortcode('subtitle', 'subtitle_link_att'); //[subtitle class="subtitle"]Link[/subtitle]
Dieser Beitrag hat 0 Kommentare