Below, you’ll find a detailed guide on how to add the Embed Calendly 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 Embed Calendly Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the Embed Calendly Plugin and the shortcodes it provides:
"Embed Calendly is a user-friendly WordPress plugin that seamlessly integrates your Calendly scheduling tool into your website, allowing easy appointment bookings."
- [calendly]
Embed Calendly [calendly] Shortcode
The ‘calendly’ shortcode is a part of the embed-calendly-scheduling plugin. It allows users to embed a Calendly scheduling interface into their WordPress site. This shortcode calls the ‘register_shortcode’ function, which loads a view based on the attributes given. This enables seamless scheduling integration.
Shortcode: [calendly]
Examples and Usage
Basic example – A simple usage of the shortcode to embed a Calendly scheduling widget into your post or page. This is done by passing the ‘url’ attribute with the value of your Calendly link.
[calendly url="https://calendly.com/your-username" /]
Advanced examples
Adding more customization to your Calendly widget by using additional parameters. In this case, we’re using the ‘hide_event_type_details’ attribute to hide event type details on the scheduling page, and ‘text_color’ attribute to change the color of the text in the widget.
[calendly url="https://calendly.com/your-username" hide_event_type_details=1 text_color="#ffffff" /]
Displaying a Calendly widget in inline mode by using the ‘inline’ attribute. This will make the widget appear directly on the page, instead of a popup. We’re also using the ‘primary_color’ attribute to change the primary color of the widget.
[calendly url="https://calendly.com/your-username" inline=1 primary_color="#00a2ff" /]
PHP Function Code
In case you have difficulties debugging what causing issues with [calendly]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode('calendly', array('EMCS_Shortcode', 'register_shortcode'));
Shortcode PHP function:
function register_shortcode($atts) {
return self::load_view($atts);
}
Code file location:
embed-calendly-scheduling/embed-calendly-scheduling/embed-calendly-scheduling.php
Conclusion
Now that you’ve learned how to embed the Embed Calendly 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