How can I open the ZenDesk widget using URL links?

Hi, I added the ZenDesk widget snippet to theme.liquid and the widget is shown on all pages of my store. I want to use URL links to create buttons that expand the widget, how can I achieve this?

  1. Locate the ZenDesk widget snippet: Open your theme editor or access the theme.liquid file in your code editor. Look for the section where the ZenDesk widget snippet is added. It typically looks like <script type="text/javascript" src="..."></script>.

  2. Add button elements with custom URLs: Within the ZenDesk widget snippet, find the appropriate place where you want to add your buttons. You can add them after the initialization code or within a separate function that triggers the widget expansion.

    Add button elements with the desired text and URLs. For example:


Create a JavaScript function to expand the widget: Below the ZenDesk widget snippet, add a <script> tag to define a JavaScript function that expands the widget when the button is clicked. Here’s an example:


Thank you for the quick reply, @NomtechSolution

I’m completely new to making web pages. so I added


and


to theme.liquid

and


to the page’s html

This doesn’t expand the widget on click. The your-custom-url is the url for the ZenDesk widget?