Add basic Open Graph Tags (copy)
<meta property="og:title" content="”/> <meta property="og:description" content="”/> <meta property="og:url" content="”/> <meta property="og:image" content="”/>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
<meta property="og:title" content="”/> <meta property="og:description" content="”/> <meta property="og:url" content="”/> <meta property="og:image" content="”/>Continue reading
// 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
// add upsells below add-to-cart button add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_upsell_display’, 40 );Continue reading
// 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
// 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
.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
/* 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
;(() => { 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