Hi there!
I’ve successfully set up a WhatsApp button on listings using the “phone” attribute. Since WhatsApp is a widely used chat service here, I’d like to make this button **visible only for listings that are marked as “featured.”**I was able to get this working on the block view (Showing for featured and hiding on non featured), but it’s not showing up on the single listing page. On the single view, none of the buttons are displaying at all for both featured and normal listings. Below is the code let me know what i should change.
/* Hide WhatsApp button for non-featured listings */
.hp-listing__attribute--contact-number-non-tenant {
display: none !important;
}
/* Ensure the WhatsApp button is visible for featured listings */
.hp-listing--featured .hp-listing__attribute--contact-number-non-tenant {
display: block !important;
}
/* Ensure WhatsApp button is visible on individual listing pages */
.single-listing .hp-listing--featured .hp-listing__attribute--contact-number-non-tenant {
display: block !important;
opacity: 1 !important;
visibility: visible !important;
}
I’m not very technical, so I would really appreciate a step-by-step guide on how to do this. And yes the above codes are generated by my best friend chatgpt
Thank you so much!