While wp_mail()
is not exactly forbidden in a theme, it is very likely misplaced there. The purpose of a theme is presentation. It should not change existing data, and it should always be easy to replace.
That’s the reason why contact forms, polls, shops, tracking and similar functionality is pure plugin territory. There is no context for wp_mail()
in a theme.
Related Posts:
- How Do I Protect My Premium WordPress App Theme from Copying?
- When to use _e and __ for the translation?
- What is the advantage of using wp_mail?
- Get entered value of customiser field for live preview
- With WordPress themes, where do I store the images and files relatively?
- Should `get_template_directory_uri()` be escaped?
- How to Include SVG sprites icons into the body tag? [closed]
- Why doesn’t /2013/01/ properly return January’s archives in archive.php?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Child Theme not loading parent CSS
- WordPress settings API error when checkbox unchecked
- How the WordPress sidebar works
- two tinyMCE editors in the same page
- Replace Home with image link inside custom header menu
- Separated Comment from Post
- index.php is not loaded for single posts
- WordPress website loads but is not displayed until page scrolled
- wp_head() not inserting the default stylesheet style.css
- Theme Customizer not loading
- WordPress Customizer Control with React
- File Security Check in wordpress in index.php of theme
- how to implement wp_is_mobile on themes?
- Force index.php have_posts() loop to exit if no sticky posts found
- How to disable automatic colors in the Twenty Twenty theme?
- Is my approach to enqueue styles inefficient?
- Part of Menu Item Hidden on Header Menu
- Child theme style.css versioning
- How do the default themes reference style.css?
- Input ordering in wordpress theme customizer
- Customize the previous_post_link output
- How to use get_template_part instead of include_once?
- How to remove comment link title attribute?
- Which file handles the block latest posts, I want to examine excerpt handling
- Should we use ob_start() in WordPress short code
- Menu item added in wp_nav_menu_items filter is never highlighted
- Single page site with history.js
- How do i make a custom section’s setting display the default value in Customizer?
- Warning: A non-numeric value encountered in theme functions.php
- How can I ping update-core.php with a script?
- In this snippet how do I force the function to use gravatar rated G and fill in the alt for get_avatar()?
- “Add A Widget” button in the Customizer
- Responsive Images – crop don’t seem to work
- loading blank white screen of slide
- Set parent theme language with custom .mo files
- WooCommerce: multiple input field for multiple product variations
- Change template if tag selected
- How to unset a set query variable?
- Overide enqueue in non plugable function via child theme
- Starting point for custom Themes [closed]
- How to order by multiple date meta_values?
- How to reverse engineer the Twenty Eleven background image uploader?
- Theme Development -> Specific Homepage
- WordPress Theme With Modified View
- How to safely return the HTML?
- How do I modify the ‘more’ link in a feed
- Create something that can be added or removed in Customizer
- jQuery from parent theme loaded with many other scripts in a single min.js file
- Javascript development in Custom Themes
- Menu dispareing when visititing current page [closed]
- WordPress dashboard
- Implementing HTML/CSS menu in WordPress theme
- Allow filtering of loops for all categories
- Hide/disable sidebar using shortcode?
- Where are the options “template” and “current_theme” derived from
- What Can I do To Achieve this Effect: WIP -> Portfolio
- Trying to link to a php template file but its blank
- A Reviews Page is Showing root Index.php instead of Template-Page
- Twentytwenty theme p-tags break em- and strong-tags that span several paragraphs
- Image cropping isn’t working correctly when using Offload Media
- Can any IDE (eg PHPStorm, VS Code) correctly show functions added via require get_template_directory() string results?
- Array for WordPress Avatar Size and Class
- Pages not displaying as sections on static page
- custom js script is not loading
- Template for front page (latest posts)
- How to toggle WP Customizer Panel and Section with JavaScript API?
- is_active_sidebar() problem
- WordPress uploads do not show up and I see the white screen of death in some cases
- HTML to → WP Conversion
- Add multiple sections, settings and controls at once to the Customizer
- Font not loading [closed]
- How to change parent permalink?
- how to call options on front end and add logo
- Jetpack Infinite Scroll Not Working
- Adding a Class to an Getting From Post Content
- Editable screenshot.png in a custom theme developed
- How to create multiple pages in a client theme?
- How to share posts (and plugins) between existing site and new, separate dev/test installation?
- get_theme_mod not pulling css colors into header using wp_head
- Duplicate WordPress site to subdirectory but use same db?
- Menu order of parent menu from perspective of child menu
- Conditional loop based on current page
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- wp_deregister_script was called incorrectly
- Undefined index: debuging error for theme option template snippet
- Add the ability of changing background color of a theme [closed]
- How to use esc_attr__() function properly to translate a variable that contains string?
- custom theme’s search not working
- Permalinks problem with custom theme
- Purchased Theme to Custom Made Theme? [closed]
- How to make website with many template that active [closed]