Below, you’ll find a detailed guide on how to add the GoDaddy Email Marketing Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the GoDaddy Email Marketing Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the GoDaddy Email Marketing Plugin and the shortcodes it provides:
"GoDaddy Email Marketing is a powerful WordPress plugin that simplifies the process of creating and integrating sign-up forms for your email marketing campaigns, courtesy of GoDaddy."
- [gem]
GoDaddy Email Marketing [gem] Shortcode
The GoDaddy Email Marketing SignUp Form shortcode is a simple tool to integrate email signup forms into your site. The ‘gem’ shortcode renders an email signup form identified by the ‘id’ attribute. If no ‘id’ is provided, it returns nothing.
Shortcode: [gem]
Parameters
Here is a list of all possible gem shortcode parameters and attributes:
id
– The unique code that distinguishes one form from another.
Examples and Usage
Basic example – A simple display of the GoDaddy Email Marketing sign-up form by referencing its ID.
[gem id=1 /]
Advanced examples
Embedding the GoDaddy Email Marketing sign-up form by referencing its ID, with the ‘false’ parameter to prevent auto-display.
[gem id=1 false /]
Displaying the GoDaddy Email Marketing sign-up form without specifying an ID. This will return nothing as the ‘id’ parameter is set to false by default.
[gem /]
Please note that in all of these examples, the ‘id’ parameter is crucial as it tells the shortcode which sign-up form to render. If no ‘id’ is provided, the shortcode will not return anything.
PHP Function Code
In case you have difficulties debugging what causing issues with [gem]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode( 'gem', array( $shortcode, 'render' ) );
Shortcode PHP function:
function render( $atts ) {
$atts = shortcode_atts(
array(
'id' => false,
),
$atts
);
if ( ! $atts['id'] ) {
return;
}
return gem_form( $atts['id'], false );
}
Code file location:
godaddy-email-marketing-sign-up-forms/godaddy-email-marketing-sign-up-forms/godaddy-email-marketing.php
Conclusion
Now that you’ve learned how to embed the GoDaddy Email Marketing Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.
Leave a Reply