Hi,
Congratulations for choosing this plugin and thanks a lot for using it. Regarding your concern is_active_sidebar() is checking if there is a widget inside the sidebar which in that case there is so the else function will not be called. You can use the script below instead of that one, just make sure to change “slider-widget-area” to the right one. Let me know how it goes. Thanks!
<?php if ( is_active_sidebar( 'slider-widget-area' ) ){
dynamic_sidebar( 'slider-widget-area' );
} ?>
<img src="<?php header_image(); ?>" class="sidebar-placeholder" style="display:none;" width="100%" height="auto" alt="" />
<script type="text/javascript">
$(document).ready(function(){
if( $('.slider-widget-area').height() < 10 ){
$('.sidebar-placeholder').show();
}
});
</script>
Cheers,
phpbits
Thread Starter
cs-web
(@cs-web)
Hi,
I have used your code, but it doesn’t works. It is the same problem. The Slider will display, but the exceptions not.
But with the old plugin “Display widgets” my code works.
Cheers,
Hi,
Can you post your website link? Thanks!
Cheers,
phpbits
Thread Starter
cs-web
(@cs-web)
Hi,
can I send you the Link via Mail? It’s not a public project 😉
Thread Starter
cs-web
(@cs-web)
Hi phpbits,
With the Safari Developer Plugin I get this Error:
TypeError: $ is not a function. (In ‘$(document)’, ‘$’ is undefined)
(anonyme Funktion)ueber-uns:57
<script type="text/javascript">
$(document).ready(function() {
if ($('.slider').height() < 10) {
$('.sidebar-placeholder').show();
}
});
</script>
Hi,
Not sure why I didn’t get email notification when you replied. I hope it’s not too late to solve the issue. You can use this one to fix the $ issue :
<script type="text/javascript">
jQuery(document).ready(function() {
if ( jQuery('.slider').height() < 10) {
jQuery('.sidebar-placeholder').show();
}
});
</script>
Let me know how it goes. Thanks!
Cheers,
phpbits
Thread Starter
cs-web
(@cs-web)
Hi,
no problem. I don’t get a error message, but I get the widget content and in additional the alternative header picture.
I want use the meta-slider for special pages. For other I want set up an costumer header.
With the old plugin the php if-clause works fine. (display-widgets) 🙁