Shortcodes Group

The ht-ctc-group Shortcode allows us to display a WhatsApp Group button on any page or post. By default, the shortcode uses the values set in the plugin settings. However, we can override these defaults using shortcode attributes.

[ht-ctc-group]

Shortcode Attributes

Group ID

To specify a different WhatsApp group ID, use the group_id attribute:

[ht-ctc-group group_id=Ica32m8Po7hBhuIDBbsL92]

Call to Action

To customize the call-to-action text, use the call_to_action attribute:

[ht-ctc-group call_to_action="Chat with Us"] 

Style

Change the button’s visual style using the style attribute (e.g., style=1, style=2, etc.)

[ht-ctc-group style=1]

Positioning

To position the button on the screen, use the position attribute along with CSS-based positioning values like top, right, bottom, and left:

[ht-ctc-group style=2 position=fixed top=50px right=40px]

[ht-ctc-group style=5 position=fixed top=40% left=30%]

[ht-ctc-group style=1 position=fixed bottom=20% right=70px]

[ht-ctc-group style=6 position=fixed bottom=10px left=60px]

Device Visibility

To control visibility based on the device type:

Hide on mobile devices:

[ht-ctc-group hide_mobile=yes]

Hide on desktop devices:

[ht-ctc-group hide_desktop=yes]


Additional Note

For Style 2, 3, and 7, the Call to Action text appears as a tooltip on hover, implemented via the HTML title attribute.