Comment Widget

Hi Elfsight team! :waving_hand:

I’m currently working with the comment widget, and I’d like to know if there’s a way to dynamically customize the JavaScript behavior based on the current URL.

More specifically:

  • Each of my pages includes a dynamic ID parameter in the URL (e.g. ?id_property=12345), which identifies a unique listing.
  • I would like the comments to be associated only with that ID, so each page has its own thread.
  • I need to know if there’s a way to bind the comment thread to that id_property value in the URL, either by injecting custom JavaScript or configuring something within the widget settings.

Is there any API, JS callback, or attribute I can use to override or define the content ID or URL the widget uses to determine the comment thread?

Let me know if that’s possible or if there’s a recommended workaround.
Thanks in advance!

Best,
Martin

2 Likes

Hi there, @Martin_Hernayes :waving_hand:

Glad to say that you can install the widget to all property pages and each page will have its own threads by default. So, you don’t need to do anything additionally.

Please try it out and let me know if it worked :slightly_smiling_face:

1 Like