Support » Plugin: Jetpack by » Share images, css & js not loading from subdomain.

  • Resolved James


    I have all images, css and js loading from and respectively. All other plugins the images, css, js load from those respective domains. But JP sharing buttons and css & js are still loading from

    What file can I edit to make sure it obeys rewrites like all other plugins or how can I manually setup css & js as per the “Disable CSS and JS” option. Is there a guide or how to page for that?


Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve


    Jetpack Mechanic

    Once you’ve checked the “Disable CSS and JS” option, you will be able to manually enqueue your own sharing js and css files.

    Jetpack uses the WP_SHARING_PLUGIN_URL constant to build the path to load the libraries. You could change that constant by your own when re enqueueing the sharing libraries, like so:

    function tweakjp_add_sharing_js() {
        wp_enqueue_script( 'sharing-js-fe', YOUR_OWN_WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 3 );
    add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_js' );
    function tweakjp_add_sharing_css() {
        wp_enqueue_style( 'sharing', YOUR_OWN_WP_SHARING_PLUGIN_URL.'sharing.css', false, JETPACK__VERSION );
    add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_css' );
Viewing 1 replies (of 1 total)
  • The topic ‘Share images, css & js not loading from subdomain.’ is closed to new replies.