Customize Your Button
Configure the appearance and content of your shopping list button
Contents
Design
Icon
Add your own CSS to further customize the button appearance
Live Preview
Real-timeInstallation Instructions
Copy the Generated Code
Click the "Copy Code" button above to copy the complete HTML and CSS code to your clipboard.
Paste into Your HTML File
Open your HTML file and paste the CSS code inside the <head> section (within <style> tags) and the HTML code where you want the button to appear.
Add the Listonic Script
Include the Listonic button script before the closing </body> tag to enable the add-to-list functionality.
Test Your Button
Open your page in a browser and click the button to verify it opens the Listonic add-to-list interface.
Access Your Post or Page Editor
Open the WordPress admin dashboard and navigate to the post or page where you want to add the button.
Add a Custom HTML Block
In the Gutenberg editor, click the "+" button and search for "Custom HTML" block. Add it where you want the button.
Paste the Complete Code
Copy the "HTML + CSS" code from above and paste it into the Custom HTML block. Include both the style and button markup.
Add the Script (Optional)
For full Listonic functionality, add the JavaScript to your theme's footer.php or use a plugin like "Insert Headers and Footers".
Open Theme Editor
Go to Online Store → Themes → Click "Customize" or "Edit code" on your active theme.
Add CSS to Theme Styles
Navigate to Assets → theme.css (or base.css) and paste the CSS code at the bottom of the file.
Add HTML to Product Template
Find the product template (Sections → product-template.liquid) and paste the HTML where you want the button to appear.
Include the Script
Add the Listonic script to theme.liquid before </body> or use the "Script" section in your theme settings.
Create a Component
Create a new file called ListonicButton.jsx (or .tsx for TypeScript) in your components folder.
Add the Styles
Copy the CSS code and either add it to a CSS module (ListonicButton.module.css) or use styled-components / inline styles.
Implement the Component
Use the JavaScript tab to get the component code with proper event handlers and state management.
Load Listonic SDK
Add the Listonic script to your public/index.html or load it dynamically in useEffect.
Create a Vue Component
Create a new file called ListonicButton.vue in your components directory.
Add Template and Styles
Use the HTML code in the <template> section and CSS code in <style scoped>.
Register the Component
Import and register the component in your parent component or globally in main.js.
Load External Script
Load the Listonic script in your index.html or use the mounted() lifecycle hook to load it dynamically.