WordPress has its own email functionality, which call wp_mail for sending emails. WordPress wp_mail function is allowing you same functionality as PHP is giving to you so lets try and use it.
<?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?>
- $to: (string or array) (required) The intended recipient(s). Multiple recipients may be specified using an array or a comma-separated string. Default: None
- $subject: (string) (required) The subject of the message. Default: None
- $message: (string) (required) Message content. Default: None
- $headers: (string or array) (optional) Mail headers to send with the message. For the string version, each header line (beginning with From:, Cc:, etc.) is delimited with a newline (“\r\n”) (advanced) Default: Empty
- $attachments: (string or array) (optional) Files to attach: a single filename, an array of filenames, or a newline-delimited string list of multiple filenames. (advanced) Default: Empty
Last couple off days have been very hectic for me finding a solution regarding how to write code for multiple meta query for custom fields, and as I am great fan of ACF(Advance Custom Fields) I prefer using ACF, because its very easy to create fields and display values on front-end side.
In my last project my task was to display results based on search with pagination. I had so much goggled and posted question on Stackoverflow and WordPress forums but did not get any proper answer. Then I decided to use $wpdb sql query.
Recently I learned that how to assign Categories and Tag boxes to Custom Post Type. Categories and Tag are built-in meta that have been already registered in WordPress. We can not use only for Post/Page but also for our custom post type. This can be done by with argument taxonomies while registering to custom post type.
Recently I learned while working with a recent project work about how to add custom fields in product category post type using Advanced Custom Fields plugin. In this example I will show you how to “add” and how to “retrieve” Category Name, Slug, Description, Thumbnail and also our custom field. So download and install Advanced Custom Fields + WooCommerce – excelling eCommerce.
Easiest way to change text in core Joomla or third party extension, is to use Joomla default language overrides functionality. This is so simple that you don’t need to find, where the text in which file.
Before we jump out to the example, we need to understand how a language string is composed in two parts. A typical string might look like this:
JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED="Empty password not allowed"
One of my favorite script for letter-based navigation is iHwy Inc – jQuery ListNav Plugin. This plugin is very easy to implement to your current project with cool UI interface. You can find full documentation with features, options and also available with 6 types of example, So why i am writing this post?? Well I have made some small modification with this ListNav Plugin. I have added search functionality to filter records with search box.
Sometimes our code needs to be executed automatic without human interaction and that’s where Cron Job takes our duty. Cron Job checks every minute to see if there is any task to perform. If you want to know more about Cron Job check this link: Cron Unix
I learned how to execute Cron with Joomla Component in my current project, that’s why I am sharing my work with you. I am presenting you simple example of mail function that you can run with your component. If you are not familiar how to create component here is the link that you can create component: Component Creator
If you are a blogger and managing your WordPress account by it yourself, What if you will get something like “WordPress Error: The uploaded file exceeds the upload_max_filesize directive in php.ini” when trying to installing WordPress theme/plugins which size is more than your server allow.
jQuery Autocomplete enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.
After googling how to use HTM5 placeholder element with jQuery autocomplete. I found a solution from stackoverflow and I thought to share it here.
This tutorial is very useful for those who just started developing in php field and it’s a very common script. You can find lots of similar scripts in world wide web, but I am posting for you and I hope this code become helpful to your project.
In this image upload script you will be get unique file name by adding timestamps.