This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.entry-tags > a { | |
--price-tag-height: 25px; | |
--price-border-radius: 4px; | |
position: relative; | |
display: inline-flex; | |
height: var(--price-tag-height); | |
margin-left: calc(var(--price-tag-height) / 2); | |
padding: 0 calc(var(--price-tag-height) / 2); | |
color: #fff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this to Content Blocks > Hook > No Condition or Location | |
// Call it through Customizer > Product Archives > Card Options > Enable Content Block Element > Select the Hook name in drop down | |
if ( is_product() || is_shop() || is_tax( 'product_cat' ) || is_tax( 'product_tag' ) ) { | |
global $product; | |
if ( ! $product->is_sold_individually() && 'variable' != $product->product_type && $product->is_purchasable() && $product->is_in_stock() ) { | |
echo '<div class="dhn-atc-wrap">'; | |
woocommerce_quantity_input( array( 'min_value' => 1, 'max_value' => $product->backorders_allowed() ? '' : $product->get_stock_quantity() ) ); | |
echo '<a href="' . esc_url( $product->add_to_cart_url() ) . '" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" data-product_id="' . esc_attr( $product->get_id() ) . '" aria-label="' . esc_attr( sprintf( __( 'Add to cart: %s', 'woocommerce' ), $product->get_name() ) ) . '" aria-describedby="" rel="nofollow">' . esc_html( $p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.entry-card.type-project {overflow: hidden; position: relative } | |
.entry-card.type-project::after { position: absolute; content: ""; top:0; left:-100%; width: 100%; height: 100%; background-color:var(--theme-palette-color-1); z-index: 1; transition: all 1s ease; } | |
.entry-card.type-project:hover::after { left: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pre_get_posts', function( $query ) { | |
if ( $query->is_main_query() && is_post_type_archive( 'product' ) ) { | |
$query->set( 'meta_query', array( | |
'relation' => 'OR', | |
array( 'key' => '_featured', 'value' => 'yes', 'compare' => 'EXISTS' ), | |
array( 'key' => '_featured', 'compare' => 'NOT EXISTS' ), | |
) ); | |
$query->set( 'orderby', array( '_featured' => 'DESC', 'date' => 'DESC' ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.entries[data-layout="grid"] article:first-child, | |
.entries[data-layout="grid"] article:nth-child(8n), | |
.entries[data-layout="grid"] article:nth-child(23n), | |
.entries[data-layout="grid"] article:nth-child(79n), | |
.entries[data-layout="grid"] article:nth-child(91n) { | |
grid-column: span 2; | |
} | |
.entries[data-layout="grid"] article:first-child, | |
.entries[data-layout="grid"] article:nth-child(7n), | |
.entries[data-layout="grid"] article:nth-child(45n), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.entries[data-layout="grid"] article:first-child, | |
.entries[data-layout="grid"] article:nth-child(7n+1) { | |
grid-column: span 2; | |
} | |
.entries[data-layout="grid"] article:first-child, | |
.entries[data-layout="grid"] article:nth-child(5n+1) { | |
grid-row: span 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ct-post-grid article:first-child, | |
.ct-post-grid article:nth-child(7) { | |
grid-column: span 2; | |
} | |
.ct-post-grid article:first-child, | |
.ct-post-grid article:nth-child(5) { | |
grid-row: span 2; | |
} | |
.ct-post-grid article .wp-block-cover { | |
min-height: 250px; |
NewerOlder