Part of WordPress Integration — 3 of 4.
Adding Custom Triggers to a Page
Custom triggers let you embed a centered search box or suggestion pills on a specific page — ideal for event landing pages, product pages, or campaign hubs. The widget script from footer.php (or WPCode) powers these automatically; you do not need a second script tag on the page.
Add the trigger markup to a Custom HTML block in the WordPress block editor. For the full snippets, attributes, and styling options — including the real-world Acme Corporation example of routing visitors to specific pre-written questions — see Custom Triggers.
WordPress-specific gotcha: WordPress strips text content from <button> tags inside Custom HTML blocks. Use <a> tags instead, with the label text between the opening and closing tags, so pill labels don't come out empty. See Best Practices & Troubleshooting for this and other WordPress-specific issues.
← Adding the Script via WPCode | Next: Best Practices & Troubleshooting →