Filters
Display WhatsApp button when the product is out of stock
Display WhatsApp chat widget in custom post types
When you want to display the WhatsApp widget only on specific pages and custom post types, please follow these steps.
Go to the Display Settings tab and select Show on these pages. It will list your published pages and posts as checkboxes. Please select those pages which you want to display the widget on.
Then, please add this snippet to display the WhatsApp widget in custom post types.
Your code snippet may look like this. Please add those CPTs based on your purposes.
Hide WhatsApp chat widget in custom post types
To hide the WhatsApp widget only on specific custom post types, follow these steps to add a new hook.
You're done! Happy customizing~
Last updated