Support » Developing with WordPress » get_stylesheet_directory_uri returning stage-cdn instead of production url

  • Hi Team,

    get_stylesheet_directory_uri() is returning stage-cdn.XXXX.com domain instead of production domain.

    Could you please help me to resolve this

    Thanks,
    SDO

    • This topic was modified 3 months, 2 weeks ago by  sdo13.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Either the constant WP_CONTENT_URL has been defined to lead to stage-cdn or some other code is filtering the stylesheet_directory_uri return value. WP_CONTENT_URL would usually be defined in wp-config.php.

    If no constant definition is evident, to isolate the source of filtering, deactivate all plugins and switch to the twentynineteen theme. Temporarily add some code after the body tag in header.php of twentynineteen that outputs the result of get_stylesheet_directory_uri().

    When you view a front end page in this state you should see the correct URI. Reactivate your plugins, one at a time and reloading a page to check the URI. When it reverts to stage-cdn again, the last activated plugin is the cause. If you get through all plugins without the URI changing back, the cause is your normal theme.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.