Archives: Snippets
Search Atlas
Untitled Snippet
JavaScript for Craft Picker
// Menu Toggle function toggleMenu() { const mobileNav = document.querySelector(‘.mobile-nav’); mobileNav.classList.toggle(‘active’); } // Close Menu on Scroll function closeMenuOnScroll() { const mobileNav = document.querySelector(‘.mobile-nav’); if (mobileNav.classList.contains(‘active’)) { mobileNav.classList.remove(‘active’); } } // Attach the scroll event listener window.addEventListener(‘scroll’, closeMenuOnScroll); // Show…Continue reading
CSS For Craft Picker
/* General Styles */ body { margin: 0; font-family: ‘Arial’, sans-serif; background-color: #f9f9f9; color: #333; line-height: 1.6; } /* Header Styles */ .header { background-color: #ffe4e1; text-align: center; padding: 20px 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }…Continue reading
Disable Smooth Scrolling in Tasty Recipes
add_filter( ‘tasty_recipes_smooth_scroll’, ‘__return_false’ );Continue reading
Relevant Life Calculator
How to Conditionally Show the Next Button on a Specific Page
/** * Hide Next button on page 2 by default and show it once an option in a field (e.g. Multiple Choice) is selected. */ // Add CSS to hide the Next button on page 2. add_action( ‘wp_head’, function ()…Continue reading