Title: Loading scripts only on single.php
Last modified: August 22, 2016

---

# Loading scripts only on single.php

 *  [Elli_K](https://wordpress.org/support/users/elli_k/)
 * (@elli_k)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/loading-scripts-only-on-singlephp/)
 * Hi! Firstly, thank you for a great plugin!
 * How ever, I would like to load scripts only where needed; this case on single.
   php, where comments are.
    I was able to do this on main site with `<?php if (
   is_single()) { ?>` -rule in the header, (I know, that’s not the most best way
   to do it), and all works fine. But with subdomains this does not work fully, 
   cause I’m out of ideas, how to link correctly plugins ajaxurl.
 * Any help would be really appreciated.
 * [https://wordpress.org/plugins/safe-report-comments/](https://wordpress.org/plugins/safe-report-comments/)

The topic ‘Loading scripts only on single.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/safe-report-comments.svg)
 * [Safe Report Comments](https://wordpress.org/plugins/safe-report-comments/)
 * [Support Threads](https://wordpress.org/support/plugin/safe-report-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/safe-report-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/safe-report-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/safe-report-comments/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Elli_K](https://wordpress.org/support/users/elli_k/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/loading-scripts-only-on-singlephp/)
 * Status: not resolved