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]
# 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 at 6:47
  • ok thanks #kero – Ganpat janwa Jun 15 at 8:11

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

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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