How to add code to a page in the / head section

  • Author
    Posts
  • #118712

    Hello, I need help from you. As in Anima (Anima v1.4.1) add code to the site. I am going to paste the code just before the </head> closing tag. How can I do that?

    #118717
    Zed
    Cryout Creations mastermind

    Hi,

    It is bad practice to modify theme, plugin or WordPress files directly. WordPress’ customizable nature stems for its complex use of hooks and filters.
    To add (javascript) code to the site’s header you should use a plugin like https://wordpress.org/plugins/header-and-footer-scripts/
    If you’re looking to add PHP code (or plain HTML) in the header, you should do that using a child theme or a mini-plugin and hook the code to an existing hook, such as wp_head.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How to add code to a page in the / head section’ is closed to new replies.