Archives: Snippets
Real Estate Website
Dream Career Project — Real Estate Agent Dream Career Project Real Estate Agent A clear plan showing the skills, training, and steps I will take to reach my dream job in real estate. Why I Chose It Hard Skills Training…Continue reading
Fix “Send to Friend” Field Visibility for Variable Gift Cards
function themify_fix_agcfw_variable_product_scripts() { // Only run on single product pages if ( ! is_product() ) { return; } // Only run if Themify theme is active if ( ! class_exists( ‘Themify_Enqueue_Assets’ ) ) { return; } // Only run if…Continue reading
Untitled Snippet
function getChatContent() { const chat = document.querySelector(‘.mwai-chatbot .mwai-messages’) || document.querySelector(‘.mwai-chatbot’); return chat ? chat.innerHTML : ”; } function getChatText() { const chat = document.querySelector(‘.mwai-chatbot .mwai-messages’) || document.querySelector(‘.mwai-chatbot’); return chat ? chat.innerText : ”; } function buildPDFHtml(content) { return ` Your…Continue reading
Vimeo Autoplay Unmute (Homepage)
document.addEventListener(“click”, function () { const iframe = document.querySelector(“iframe[src*=’vimeo.com’]”); if (!iframe) return; iframe.contentWindow.postMessage( JSON.stringify({ method: “setVolume”, value: 1 }), “*” ); iframe.contentWindow.postMessage( JSON.stringify({ method: “play” }), “*” ); }, { once: true });Continue reading
Hide Cart Price Button
/** * Hide Price & Add to Cart for Non Logged in Users for Specific Products */ function is_non_purchasable_products_for_visitors( $product ) { $not_purchasable_products = array( 23, 22 ); // Replace with Products ID you want to set as non purchasable…Continue reading
run on payment page
// This code runs every time the page is opened/reloaded $visits = 1; if (isset($_COOKIE[‘visits’])) { $visits = (int)$_COOKIE[‘visits’] + 1; } setcookie(‘visits’, $visits, time() + (86400 ), “/”); // Cookie lasts 1 days if ( ! defined( ‘EMAIL_SENT_PAGE_410’ )…Continue reading
Untitled Snippet
Add aria-label to progress bar to improve WPForms accessibility
/** * Fix WPForms Accessibility: Add aria-label to progress bar. */ function wpf_fix_wpforms_progressbar_aria() { ?>Continue reading
WPForms Custom Real-time Keyword Blocklist
/** * WPForms Custom Real-time Keyword Blocklist * * @link https://wpforms.com/developers/add-a-real-time-keyword-blocklist-to-a-single-line-text-field/ */ function wpf_dev_realtime_keyword_blocker() { ?>Continue reading