Title: Query doesn&#039;t work
Last modified: September 1, 2016

---

# Query doesn't work

 *  Resolved [Artur](https://wordpress.org/support/users/arturart7gmailcom/)
 * (@arturart7gmailcom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/query-doesnt-work/)
 * Hi,
    I have code to download automatically on page but it does’t work. I have
   something like this below of course i change link <script type=”text/javascript”
   >window.open(‘[http://www.file.pdf](http://www.file.pdf) ‘);</script>
 * [https://wordpress.org/plugins/oh-add-script-header-footer/](https://wordpress.org/plugins/oh-add-script-header-footer/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [SOGO](https://wordpress.org/support/users/orenhav/)
 * (@orenhav)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/query-doesnt-work/#post-7551735)
 * Can you please share a link
 *  Thread Starter [Artur](https://wordpress.org/support/users/arturart7gmailcom/)
 * (@arturart7gmailcom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/query-doesnt-work/#post-7551736)
 * There is the site:
    [http://www.dynamicsbusinessforum.pl/dziekujemy_pobranie/](http://www.dynamicsbusinessforum.pl/dziekujemy_pobranie/)
 * and I would like to add 5 second delay. Explain you open the page and after 5
   second automatically is opening the window with PDF.
 *  Plugin Author [SOGO](https://wordpress.org/support/users/orenhav/)
 * (@orenhav)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/query-doesnt-work/#post-7551737)
 * Hi Arthur,
    I see that you have some JS error on your page, did you try fixing
   them? that might prevent scripts from running.
 * You also should consider putting it in the footer and not in the header, you 
   should also understand that browser can block popup windows so you should use
   
   location.href = [link to your file]
 * Please try first to clear you js errors and use the script in the footer with
   `
   alert('testing');`
 *  Plugin Author [SOGO](https://wordpress.org/support/users/orenhav/)
 * (@orenhav)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/query-doesnt-work/#post-8726591)
 * No response

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Query doesn't work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/oh-add-script-header-footer_d6d6d6.
   svg)
 * [SOGO Add Script to Individual Pages Header Footer](https://wordpress.org/plugins/oh-add-script-header-footer/)
 * [Support Threads](https://wordpress.org/support/plugin/oh-add-script-header-footer/)
 * [Active Topics](https://wordpress.org/support/plugin/oh-add-script-header-footer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oh-add-script-header-footer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oh-add-script-header-footer/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [SOGO](https://wordpress.org/support/users/orenhav/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/query-doesnt-work/#post-8726591)
 * Status: resolved