Title: Programmatically Set Head
Last modified: September 13, 2021

---

# Programmatically Set Head

 *  Resolved [amistry](https://wordpress.org/support/users/amistry/)
 * (@amistry)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/programmatically-set-head/)
 * Hi,
 * I am using the WordPress API to create a page. But I also want to set code in
   the HEAD on the page programmatically after the page is created without having
   to manually navigate to the page in WP and add the code into the HEAD section.
   How can I do that? Or, is there a way to use the WordPress API to set information
   into the HEAD section of the page?
 * Here is the API:
    [https://developer.wordpress.org/rest-api/reference/pages/#create-a-page](https://developer.wordpress.org/rest-api/reference/pages/#create-a-page)
 * Any suggestions?

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [TechWebUX](https://wordpress.org/support/users/techwebux/)
 * (@techwebux)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/programmatically-set-head/#post-14924753)
 * Hello [@amistry](https://wordpress.org/support/users/amistry/),
 * Head & Footer Code keeps content for pages/posts within the post_meta key `_auhfc`
   as an serialized array for head, body, footer and behavior. You could utilize
   meta fields within your API requests [https://developer.wordpress.org/rest-api/reference/pages/#schema-meta](https://developer.wordpress.org/rest-api/reference/pages/#schema-meta)
 * Kind regards,
    Aleksandar

Viewing 1 replies (of 1 total)

The topic ‘Programmatically Set Head’ is closed to new replies.

 * ![](https://ps.w.org/head-footer-code/assets/icon.svg?rev=3299702)
 * [Head & Footer Code](https://wordpress.org/plugins/head-footer-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/head-footer-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/head-footer-code/)
 * [Active Topics](https://wordpress.org/support/plugin/head-footer-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/head-footer-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/head-footer-code/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [TechWebUX](https://wordpress.org/support/users/techwebux/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/programmatically-set-head/#post-14924753)
 * Status: resolved