I want to hide a text:
<strong class="showrelated">In Verbindung stehende Artikel: </strong>
<?php echo do_shortcode('[custom-related-posts title="" order_by="title" order="ASC" none_text=""]'); ?>
If css class is not declared. My shortcode function get this class .crp-list
Not sure how can I do that. I have tried the following but nothing happens:
if ($(".crp-list")[0]) {
$(".showrelated").show();
} else {
$(".showrelated").css("display","none");
}