Title: Render Widget Programmatically in Template File
Last modified: October 11, 2023

---

# Render Widget Programmatically in Template File

 *  Resolved [haydenrust1](https://wordpress.org/support/users/haydenrust1/)
 * (@haydenrust1)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/render-widget-programmatically-in-template-file/)
 * Hello! I am wondering how you can render a widget through code. There is a similar
   question asked here: [https://github.com/elementor/elementor/issues/5817](https://github.com/elementor/elementor/issues/5817)
   
   but does not give a very in depth answer on how it all works. What I really want
   to know is what can be passed into the first argument of the `create_element_instance`
   function? How can you pass data to this function in order to customize it?

The topic ‘Render Widget Programmatically in Template File’ is closed to new replies.

 * ![](https://ps.w.org/elementor/assets/icon-256x256.gif?rev=3444228)
 * [Elementor Website Builder - more than just a page builder](https://wordpress.org/plugins/elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementor/reviews/)

## Tags

 * [render](https://wordpress.org/support/topic-tag/render/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 0 replies
 * 1 participant
 * Last reply from: [haydenrust1](https://wordpress.org/support/users/haydenrust1/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/render-widget-programmatically-in-template-file/)
 * Status: resolved