Skip to content

Instantly share code, notes, and snippets.

View narekmal's full-sized avatar

Narek Malkhasyan narekmal

View GitHub Profile
@RadGH
RadGH / wc-attributes-variations.php
Created September 10, 2015 18:10
WooCommerce: Display dropdowns for values of attributes (variations or text)
<?php
global $product;
if ( !isset($product) ) return;
if ( !method_exists( $product, 'get_attributes' ) ) return; // Doesn't support attributes, won't have a dropdown
$attributes = $product->get_attributes();
// Note: <form> is just so this section is styled like the default variation dropdown The form isn't meant to do anything.
?>
<form class="cart" method="post" enctype='multipart/form-data' data-product_id="<?php echo $product->id; ?>">
@aderaaij
aderaaij / yoast
Last active April 3, 2024 20:11
Wordpress - Move yoast seo boxes to bottom of post/page
// Move Yoast to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');