Social Media Widget
[resolved] [SOLVED] Load CSS/Images from mapped domain (2 posts)

  1. John Peden
    Posted 3 years ago #

    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 {


  2. brianfreytag
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Social Media Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic