• Resolved kokoruz

    (@kokoruz)


    My client would like the cookie script directly after the <head> tag but I cant determine if there is a way to give priority placement to a script. Right now the placement is within the <head> tag but closer to the bottom than the top. Can this plugin do this or do I have to manually code this request to place the cookie code script in the exact placement under the the opening <head> tag

Viewing 1 replies (of 1 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @kokoruz,

    I replied to the ticket you submitted on our site but I will also add the answer here for anyone else looking for a solution to this.

    WPCode uses the wp_head action so the best we can do using that is to write a PHP script and add the script with a higher priority to make sure it’s loaded before anything else but that will just place it before anything added to wp_head, anything added in the <head> area in the header.php theme template file will still be above it but those should not interfere in any way since they are usually just meta tags and the page title.

    The only way I can think of adding a script right after the opening head tag is with the Insert Anywhere locations available in the premium version of WPCode where you can use a CSS selector to insert a snippet anywhere on the page: https://a.supportally.com/i/b8gp6m – this inserts the snippet right after the <head> element.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.