I have found the problem. It happens if the snippet is stopped as a result of the die() or exit() functions. It did not seem to be related to the errors resulting from the deprecated PHP create_function(). I can see how this could create a problem since it's actually causing Wordpress to die...
After enabling DEBUG I found out that the errors was not in my Woody Snippet code, but actually in a plugin called PHP-Code-Widget caused by the deprecated PHP function create_function(). After fixing that, I found out that this error was also in the Slider Revolution plugin. I have a feeling...
Hi Temyk,
Thanks for letting me know about DEBUG. I can't believe that after all these years I never felt I needed it and never knew about it.
I turned on DEBUG and got this message.
Deprecated: Function create_function() is deprecated in...
When I load pages where there is a snippet short code specified, the Wordpress banner doesn't show. If I select a different page, the banner appears. I also have a bunch of other problems that seem to be related to the snippets but this is the only one directly related.
Problem solved!
While looking at some other examples of datepickers I noticed a different way of programming the $( function line in JS. I tried the different way and it worked. I hope this fixes it permanently.
Thanks, Dave.
Well it worked ... and then it stopped working. So I copied the jQuery code that was working but stopped working into a very simple new page with a FORM that has 2 date fields so that I could work with it, but I still can't get it to work. I have used basically the same JS code in a...
Thank you Temyk,
It was a little tricky since I had to add the wp_enqueue calls.
Here's the final code which works, and was included at the beginning of my Woody Snippet Script.
Any suggestions to improve on this.
Dave.
wp_enqueue_script('jquery-ui-datepicker')...
I'm looking for an alternative to the HTML5 datepicker for my PHP code generated FORM. It mostly works but is not great. Is there an alternative which will work in my PHP Snippet which is is either internal to WordPress or included in jQuery or as another plugin.
Thanks, Dave W.