How to add CSS style sheet dynamically in wordpress

It seems like copy/paste gone wrong – both your variables point to same URL link and so file_exists() fails because it expects local path.

Change $myStyleFile to local path and it should work.

Leave a Comment