0

i have error in console 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access. my ht-access file look like this..

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /new/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /new/index.php [L]
</IfModule>
# END WordPress
  • it's because you are including any file in wrong way from any other domain, and for WordPress you should use wp_enqueue_script() to add any CSS or JS. – Akshat Jun 15 '18 at 6:47
1

Enqueue the script or style using wp_enqueue_script() or wp_enqueue_style()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.