Support » Plugin: Social Media Widget » [Plugin: Social Media Widget] [SOLVED] Load CSS/Images from mapped domain

  • Resolved John Peden


    When running multisite with mapped domains, the plugin content loads from the unmapped domain. This can cause problems with cacheing. I modified the plugin as follows to change this behaviour:

    //if ( !defined('WP_CONTENT_URL') ) {
    	define('SMW_PLUGINDIR', ABSPATH.'/wp-content/plugins/'.plugin_basename(dirname(__FILE__)).'/');
    /*} else {

Viewing 1 replies (of 1 total)
  • You could easily resolve this by defining your WP_CONTENT_URL for each site. Maybe in your functions.php file for the site theme, since that loads before the widget.

    You are essentially telling it to always load as if the WP_CONTENT_URL is defined when it’s not, which can cause a lot of issues on many other types of setups. That if statement wasn’t even in there when I first started, but a lot of people didn’t have it properly defined, so the widget would break without it.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Social Media Widget] [SOLVED] Load CSS/Images from mapped domain’ is closed to new replies.