product attributes on hover

// PHP function to display product attributes add_action( ‘woocommerce_after_shop_loop_item_title’, ‘display_product_attributes_on_hover’, 10 ); function display_product_attributes_on_hover() { global $product; // Get product attributes $attributes = $product->get_attributes(); if ( ! empty( $attributes ) ) { // Output container for product attributes, initially hidden…Continue reading

NSB News and Events Aggregator

// Include Simple HTML DOM parsing library if needed (you can also manually include it if necessary) if (!function_exists(‘file_get_html’)) { function file_get_html($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $output = curl_exec($ch); curl_close($ch); return…Continue reading

NSB News and Events Aggregator

// Include Simple HTML DOM parsing library if needed (you can also manually include it if necessary) if (!function_exists(‘file_get_html’)) { function file_get_html($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $output = curl_exec($ch); curl_close($ch); return…Continue reading

CSS – Formattage de blocs

.nath-bloc-bordure { border-width:4px; border-style:solid; padding:15px; } .nath-bloc-souligner { border-bottom-width:2px; border-bottom-style:solid; } /* Bloc avec une bordure arrondie */ .nath-bloc-bordure-ronde {border-radius:30px;} .nath-bloc-drop-left {border-radius: 10% 30% 50%;} .nath-bloc-drop-right {border-radius: 10% 30% 50%;} /* Epaisseur de bordure */ .nath-4border-thinner {border-width:2px;} /* Couleurs de…Continue reading

CSS – Formattage des tables

/* Formattage des tables */ /* Formattage par defaut */ table, th, td { border: 1px solid black; border-collapse: collapse; padding: 10px; max-width: 90%; } /* Standard tr */ tr:nth-child(even) { background-color: white;} tr:nth-child(odd) { background-color: lightyellow;} tr:hover { background-color:…Continue reading

AIOSEO FAQ Block accordion

;(() => { const accordionItems = document.querySelectorAll(“.wp-block-aioseo-faq”); if (!accordionItems.length) { return; } accordionItems.forEach((item) => { const itemSummary = item.querySelector(“.aioseo-faq-block-question”); const itemContent = item.querySelector(“.aioseo-faq-block-answer”); itemSummary?.addEventListener(“click”, () => { itemContent?.style.setProperty( “–content-height”, `${itemContent.scrollHeight}px` ); item.classList.toggle(“is-open”); }); }); const faqStyles = ` .wp-block-aioseo-faq {…Continue reading