Newsletters: Function – wpml_get_mailinglists

Description

wpml_get_mailinglists is used to get an Array of mailing list objects according to your needs.

Usage

wpml_get_mailinglists();

Arguments

The following arguments can be used to customize the query:

  • privatelist [ ‘Y’ | ‘N’ ] (default: ‘N’) Set to ‘Y’ to get private lists.

Example

Below is an example of using the wpml_get_mailinglists function:

if ($mailinglists = wpml_get_mailinglists(array('privatelist' => "N"))) {
	//do something with the Array $mailinglists

	foreach ($mailinglists as $mailinglist) {
		echo 'The title of this list is: ' . $mailinglist -> title;
	}
}
Shares

WordPress Optimized Hosting

Get the best WordPress hosting for speed, security and peace of mind. No restrictions, freedom to do what you need in order to run your business.

Host Now

Pin It on Pinterest

%d bloggers like this: