Title: function to add into include
Last modified: April 19, 2023

---

# function to add into include

 *  Resolved [jameswithsupersonic](https://wordpress.org/support/users/jameswithsupersonic/)
 * (@jameswithsupersonic)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/function-to-add-into-include/)
 * Hi, we created a function in function.php to auto trigger the export upon page
   publish. We want to check the URLs in the current include config if it exists,
   we don’t include the URL, else we will add the URL into the config. Basically
   we want to be able to automatically include URLs to generate static without manually
   including them in the simply static settings, as we are triggering the generation
   externally via api. We are also restricting simply static from all users except
   the site admin.
   function trigger(){//check current page urlif (exist){do nothing}
   else{add to simply static include config}}

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/function-to-add-into-include/#post-16673040)
 * Hey [@jameswithsupersonic](https://wordpress.org/support/users/jameswithsupersonic/),
 * thanks for reaching out.
 * I’m sorry, but that is absolutely beyond what we can help within the free support.
 * This function is included in the pro version (Single Exports with a filter to
   include additional URLs/files per run).
 * Best regards,
 * Patrick
 *  Thread Starter [jameswithsupersonic](https://wordpress.org/support/users/jameswithsupersonic/)
 * (@jameswithsupersonic)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/function-to-add-into-include/#post-16674107)
 * Hi, thank you for your reply, would it be possible to get a free trial for the
   pro version to see if it is what we want? thank you!
 *  Plugin Author [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/function-to-add-into-include/#post-16681525)
 * Hey [@jameswithsupersonic](https://wordpress.org/support/users/jameswithsupersonic/),
 * sure you can start one right away from the website here: [https://simplystatic.com/docs/simply-static-trial/](https://simplystatic.com/docs/simply-static-trial/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘function to add into include’ is closed to new replies.

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/function-to-add-into-include/#post-16681525)
 * Status: resolved