How to add code to display format in attribute settings

How can I add functions in here. Like lets say I added a div element in there and wanted to add function to it but I added in the header section of the theme and it didnt work. Any idea how I can get it working

Hi,

You can only add HTML code in display format. For an example, please see this doc: How to add a WhatsApp button - HivePress Help Center

​I hope this is helpful to you.