Title: Define templates programmatically within theme?
Last modified: December 4, 2019

---

# Define templates programmatically within theme?

 *  Resolved [dekket](https://wordpress.org/support/users/dekket/)
 * (@dekket)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/define-templates-programmatically-within-theme/)
 * Is there a way to define both the templates as well as all the settings for certain
   notifications, in my theme instead of the plugin settings?
 * I’d like to add 5 notifications with their respective templates and settings ‘
   statically’ so to speak. The reason for this, is that I have a multisite where
   these notifications need to be the same across the network. And since the entire
   network apart from the main site is using the same theme, I that would make the
   most sense.
 * However, perhaps the multisite add-on would help in this regard?

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

 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/define-templates-programmatically-within-theme/#post-12203599)
 * Hi [@dekket](https://wordpress.org/support/users/dekket/),
    Thanks for your message.
 * There’s no way to do this ‘programatically’ as such but you can create your notifications
   manually for one site, then use the WordPress Exporter to export the notifications
   so that you can import them to your other sites.
 * Hope this helps.
 *  Thread Starter [dekket](https://wordpress.org/support/users/dekket/)
 * (@dekket)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/define-templates-programmatically-within-theme/#post-12203692)
 * @bnfw unfortunately, since this multisite will be expanding rapidly and there’s
   already a 40-step process in cloning a new one and changing everything that needs
   changing, adding an import-step to it would be problematic :-/
 * Also, as far as I could see, the export functionality isn’t officially supported?
 *  Plugin Author [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * (@voltronik)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/define-templates-programmatically-within-theme/#post-12203700)
 * Hi [@dekket](https://wordpress.org/support/users/dekket/),
    If you want to automate
   the import process, you could set the import process up programmatically using
   something like WP-CLI.
 * The import/export process has now been tried and tested so I’ll update the documentation
   page on the BNFW website to reflect this.

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

The topic ‘Define templates programmatically within theme?’ is closed to new replies.

 * ![](https://ps.w.org/bnfw/assets/icon.svg?rev=2531573)
 * [Customize WordPress Emails and Alerts - Better Notifications for WP](https://wordpress.org/plugins/bnfw/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bnfw/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bnfw/)
 * [Active Topics](https://wordpress.org/support/plugin/bnfw/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bnfw/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bnfw/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [templates](https://wordpress.org/support/topic-tag/templates/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jack – BNFW](https://wordpress.org/support/users/voltronik/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/define-templates-programmatically-within-theme/#post-12203700)
 * Status: resolved