0

I want to add js EXACTLY right before end of head tag
I've try this solution, but it only put the js to middle of the head tag, not right before end of head tag https://magento.stackexchange.com/a/286655/70258
Thanks.

1 Answer 1

0

You need to try the code in this way.

<referenceContainer name="head.additional">
    <block class="Magento\Framework\View\Element\Template" name="custom_head_file" template="Magento_Theme::custom_head.phtml" after="-"/>
</referenceContainer>
1
  • Hi, thanks for reply, but this doesn't work, even if i try after="-".
    – fudu
    Aug 28, 2020 at 2:03

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.