You can include the wp-load.php
in your PHP file, but, I do not recommend this method. It’s better you use the wp_enqueue_script()
.
See this article to get more information.
<?php
include "../../../wp-load.php";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <[email protected]>' . "\r\n";
$headers .= 'Bcc: <'. get_bloginfo('admin_email') . '>'. "\r\n";
mail("[email protected]","Form Application",$admin_email_body,$headers);
Related Posts:
- Show Site Name on WP login screen
- get_template_directory() vs bloginfo( ‘template_directory’ ) vs TEMPLATEPATH
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Any post install tips after installing WordPress 3.0.1?
- Version Control: Entire site or just pieces?
- Getting a stack trace when an error occurs?
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to move wp-content (or uploads) outside of the WordPress directory
- Maintaining synced staging/production WP sites
- WordPress Multi Site Best Practice
- Sub posts and non unique post_name
- How to let a single post have its own domain name
- page_template toggle between 2 templates + 2 permalinks for same post
- Redirect to requested page after (custom) login
- Page load requires a trailing “/” [closed]
- How to instantly delete posts/pages permanently?
- dynamic external javascript generated using php
- Show Custom Taxonomy Slug(s)?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- How could we customize the all posts page in the admin panel?
- How do I perform a “get” call to an external API, and then display the JSON results on a page in my WordPress site?
- How to build a child theme from a react-based parent theme?
- What’s the proper way to use a custom table? [closed]
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Adding Pagination on a Custom Author Page
- How can I get the page url slug when ‘post_name’ returns an id?
- Woocommerce Product page edit
- Convert an theme options page to use in customize.php also?
- Integrate WordPress into existing website
- Setting up Different Layouts for Each Product Category and Subcategory [closed]
- Prevent access to custom login page for logged in users
- Remove template drop down for certain pages
- Adding all sub-pages to the menu manager
- Hide devices selection from customizer?
- Add options to the “Screen Options” section on the “Menus” editor
- Split Conference WordPress Page in different years
- Make custom user table column filterable
- How I display post of the post type group by year of post?
- how to get the categories for a single product in a hierarchical way
- large chunks of text went missing
- How to change popular term checklist title when edit post?
- Extra theme – header customization help [closed]
- Disable widgets in customizer for sidebar
- Save & Publish disabled for two dimensional array Customizer
- Deep customization of wp-login.php
- Custom CSS at Appearance > Edit CSS is missing after update [closed]
- How to store page visit counts?
- How to solve this problem with my subdomain?
- Load File (Function & Variable Value) from Child Theme
- Featured Image If Else Condition
- how to add custom logo to my template
- WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me
- I want to print a message in post ” After one month from publish date”
- How to query details of images in gallery that is attached to a post
- WordPress Child Theme Stylesheet being loaded before Parent’s minified .css
- How to create custom search page
- Where to store reusable content that is not a page
- WordPress broken after changing URL
- How to have multiple WordPress Menus
- How to make the Pages in WordPress Customized?
- Custom “wp_login.php?action=lostpassword” and reset password
- Custom theme – how to link the image without posting it
- Where to upload my new custom ShortCode in Separate .php file?
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Get custom text if in Category
- Conditional Logic on CF7 dropdown options
- Change admin_title of a plugin using code snippet/functions
- Validate user login in php
- Easily add custom HTML outside the main container?
- Adding a custom field to a slug
- Query Product categories what have a custom field
- How to create custom backend admin menu in different languages?
- WordPress Performance and bulk edits
- Make Widget appear on Dashboard
- Delete page titles
- Woocommerce dependent attributes
- WordPress Customizer: Check for value of CSS selector and replace it
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- Bio comes up when the visitor clicks on a picture
- How to find and replace (or add) specific word in a specific category?
- Creating a Treeview Listing of a Directory
- WooCommerce – Adding custom HTML to specific product pages
- How do I move my sites to a child theme without loosing customisation?
- Displaying all Custom fields on post except some
- WordPress Install – “end of script output before headers” when running simple php script
- How to create new page can get custom field other post in wordpress
- How to appoint different users to different pages?
- How to replace part of shortlink with nothing
- insert autofocus in a custom taxonomy form
- Is there a way to hide a user’s posts from their Activity feed?
- customize footer widgets area
- Setting up staging area
- Accessing + retrieving custom database in WordPress
- updated permalink structure on localhost does not work
- Word Press Theme Customiser and Child theme Function.php
- Security Issues with custom user role or changing core role capabilities?
- adding new html css to wordpress section from codepen [closed]
- Do i need to use PHP in customizer api?
- Add variable : 1 Week ago
- Post interior margin in twenty eleven theme