wp_sms_subscriber_form()

Updated on Jan 19, 2023

Description

Showing the subscribers form.

Simple Example

Adding the subscribers from a page template.

<?php
get_header();
?>

	<section id="primary" class="content-area">
		<main id="main" class="site-main">
		 <?php wp_sms_subscriber_form(); ?>
		</main><!-- .site-main -->
	</section><!-- .content-area -->

<?php
get_footer();

Advanced Example

Adding the subscribers from a page template with custom fields

wp_sms_subscriber_form([
    'title' => 'SMS Newsletter form',
    'description' => 'Subscribe to our SMS newsletter to get the latest news and updates delivered directly to your phone.',
    'fields' => [
        'age' => [
            'label' => 'Age',
            'description' => 'Please enter your age',
            'type' => 'number',
        ],
        'country' => [
            'label' => 'Country',
            'description' => 'Please select your country',
            'type' => 'text',
        ],
    ]
]);