Comments benoit started the conversationOctober 26, 2018 at 7:29amhellosource code : [stachethemes_ec view="agenda" show_top=0 agenda_cal_display=0 cal=142 cat=6]if there is event for this category, this plugin is displayedbut if no event, the place is empty ( white page ) , how to have a message just to say for example : "there is no event for now" ? thx 919Zhivko repliedOctober 29, 2018 at 2:39pmHi,Place this code in your theme functions.php file at the bottom:add_action('wp_footer', function() { ?> <script type="text/javascript"> (function ($) { if (typeof $.stecExtend !== 'function') { return; } $.stecExtend(function (master) { if (master.calData.eventsPool.length <= 0) { var text = "There is no event for now"; $('<p> ' + text + ' </p>').appendTo(master.$instance); } }, 'onAddToEventsPool'); })(jQuery); </script> <?php}); Stachethemes Developerbenoit repliedOctober 29, 2018 at 3:48pmthx Sign in to reply ...
hello
source code : [stachethemes_ec view="agenda" show_top=0 agenda_cal_display=0 cal=142 cat=6]
if there is event for this category, this plugin is displayed
but if no event, the place is empty ( white page ) , how to have a message just to say for example : "there is no event for now" ?
thx
Hi,
Place this code in your theme functions.php file at the bottom:
add_action('wp_footer', function() {
?>
<script type="text/javascript">
(function ($) {
if (typeof $.stecExtend !== 'function') {
return;
}
$.stecExtend(function (master) {
if (master.calData.eventsPool.length <= 0) {
var text = "There is no event for now";
$('<p> ' + text + ' </p>').appendTo(master.$instance);
}
}, 'onAddToEventsPool');
})(jQuery);
</script> <?php
});
Stachethemes Developer
thx