The front-end (full) calendar is different from the admin calendar.
As for calendar not loading, this is possibly a javasript issue. Have you tried the steps indicated in the FAQ?
I don’t know what to look for as far as the AJAX response in my browser’s console. Sorry, I’ve never done that. I’ve only looked at the HTML in Firebug.
I did swap out my theme for Twenty Twelve and the calendar showed up, but I don’t know what I’d be looking for in my files.
At least I’m getting closer.
Can you post a link to your site, I’ll take a look.
Sure, it’s http://encinochamber.org/events/events-calendar/
All the other things seem to be working (e.g., widget in sidebar, individual event pages, etc.)
Looks like an error in scripts.js of your theme. I can’t see the ajax request being fired, so its probable that that error is preventing it from initiating the it.
The error, on line 75, is that swfobject
is not defined.
Try editing that to wrap it inside a ‘is defined?’ conditinoal:
if( swfobject page_name != 'undefined'){
swfobject.switchOffAutoHideShow();
swfobject.registerObject("art-flash-object", "9.0.0", "<?php echo get_bloginfo('template_url') . '/' ?>expressInstall.swf");
}
Is this your theme? If not, if you can let me know where you got it from I can contact the developer so other users to get this problem…
Also, this
....<?php echo get_bloginfo('template_url')....
should ideally be achieved using wp_localise_script()
to contain the url inside a javascript variable.
Okay. Thanks!
Yes, this is a theme I built (I used Artisteer and customized it).
BTW I did see the swf object thing in Chrome Dev Tools but I didn’t know what to make of it.
I’ll take a look at scripts.js. I see the ….<?php echo get_bloginfo(‘template_url’)…. are you saying replace it with this?
….<?php wp_localise_script()….
Forgive my limited php.
Forgot to ask, can I copy and past my script.js here?
Here’s the code in question (well, part of it):
jQuery(function () {
swfobject.switchOffAutoHideShow();
swfobject.registerObject(“art-flash-object”, “9.0.0”, “<?php echo get_bloginfo(‘template_url’) . ‘/’ ?>expressInstall.swf”);
});
However Dreamweaver tells me I have a syntax error if I alter it like so:
jQuery(function () {
if( swfobject page_name != ‘undefined’){
swfobject.switchOffAutoHideShow();
swfobject.registerObject(“art-flash-object”, “9.0.0”, “<?php echo get_bloginfo(‘template_url’) . ‘/’ ?>expressInstall.swf”);
}
});
Hi Stephen,
Any ideas?
I just commented out the whole block of code for the swfobject in script.js, but that had no effect.
I’m not sure – where is the syntax error?
If you’re not sure how/why to use wp_localise_script()
, see this post by Pippin: http://pippinsplugins.com/making-php-variables-available-to-your-js/
It allows you to avoid printing javascript to the page directly and so you can enqueue your scripts entirely through the wp_enqueue_script()
framework.