Title: Short code not working
Last modified: August 6, 2020

---

# Short code not working

 *  Resolved [Alex](https://wordpress.org/support/users/customtest/)
 * (@customtest)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/short-code-not-working-57/)
 * Hello there,
    First of all let me thank you for this awesome plugin. I am working
   on a Multisite, and I need to retreive shortcode’s data on AJAX call for different
   sub-sites. But [spiffy-week] shortcode returns weekly calendar form Main site
   always.
 * I am trying with this code
 *  switch_to_blog($siteID);
    $result[‘html’] = do_shortcode(‘[spiffy-week]’); restore_current_blog();
 * It’s becasue, WP_SPIFFYCAL_TABLE variable have main site’s Table name instead
   of $siteID.
    When I use this shortcode on subsite page’s then its working fine.
 * Hope you can help me with this.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Spiffy Plugins](https://wordpress.org/support/users/spiffyplugins/)
 * (@spiffyplugins)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/short-code-not-working-57/#post-13217889)
 * I have made a new version 4.7.0 which removed the constant table names. Let me
   know if this fixes your problem.
 *  Thread Starter [Alex](https://wordpress.org/support/users/customtest/)
 * (@customtest)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/short-code-not-working-57/#post-13220537)
 * Hey there,
 * Thanks for quick reply. I can see that you have removed constant table name from
   plugin’s main file.
    But As of now I am not able to update the Events. While 
   debugging, I have found this. $wpdb->$wpdb->get_blog_prefix().WP_SPIFFYCAL_TABLE
   in spiffy-calendar.php file. It should be $wpdb->get_blog_prefix().WP_SPIFFYCAL_TABLE
 * Anyways shortcode is working now for Subsite as well for ajax.
 * Thanks
 *  Plugin Author [Spiffy Plugins](https://wordpress.org/support/users/spiffyplugins/)
 * (@spiffyplugins)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/short-code-not-working-57/#post-13222294)
 * Please try version 4.7.1 now
 *  Thread Starter [Alex](https://wordpress.org/support/users/customtest/)
 * (@customtest)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/short-code-not-working-57/#post-13222883)
 * Now its working. Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Short code not working’ is closed to new replies.

 * ![](https://ps.w.org/spiffy-calendar/assets/icon-256x256.png?rev=2398731)
 * [Spiffy Calendar](https://wordpress.org/plugins/spiffy-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/spiffy-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/spiffy-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/spiffy-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/spiffy-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/spiffy-calendar/reviews/)

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * 4 replies
 * 2 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/customtest/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/short-code-not-working-57/#post-13222883)
 * Status: resolved