Skip to content

Instantly share code, notes, and snippets.

@tdmrhn
tdmrhn / blx-related-products-background.css
Created March 6, 2026 11:13
Blocksy 2: Single Product Page Related Products Module with Background
@tdmrhn
tdmrhn / blc-2_add-review-link-to-star-rating.html
Created March 2, 2026 18:56
Blocksy 2: Add Auto Open Review Tab/Accordion Link to Star Rating
@tdmrhn
tdmrhn / woocommerce-reviews-author-display-name-formatting.php
Created February 4, 2026 07:00
Woocommerce Reviews Author Name Display Formating
<?php
add_filter( 'get_comment_author', function ( $author, $comment_id, $comment ) {
if ( ! $comment || get_post_type( $comment->comment_post_ID ) !== 'product' ) {
return $author;
}
if ( $comment->user_id ) {
$user = get_userdata( $comment->user_id );
$first = $user->first_name;
@tdmrhn
tdmrhn / blc-2-flexy-slider-animation.css
Created January 28, 2026 09:20
Blocksy 2 Product Flexy Slider Image Moving Animation
/* flexy slider from right to left animation */
/* hide flexy pills/thumbnails - optional
.ct-product-gallery-container .flexy-pills {
display: none;
}
*/
.ct-product-gallery-container .flexy-view .flexy-item-is-visible .ct-media-container img {
--flexy-slide-pan-distance: 80px;
@tdmrhn
tdmrhn / blocksy-2-product-card-icon-replace.css
Created January 13, 2026 17:18
Blocksy 2 Product Card Action Icons Replace
/* Product Card Wishlist Icon Change */
.ct-wishlist-button-archive .ct-icon-container svg {
display: none;
}
.ct-wishlist-button-archive .ct-icon-container:before {
content: '';
width: 15px;
height: 15px;
@tdmrhn
tdmrhn / wp-change-term-order.php
Created January 12, 2026 11:17
Blocksy Posts Filter Change WP term_order
<?php
add_filter('get_terms_args', function ($args) {
$args['orderby'] = 'term_order';
$args['order'] = 'ASC';
return $args;
});
@tdmrhn
tdmrhn / blc-2-change-product-hover-image.php
Created December 27, 2025 21:43
Blocksy Change Product Card Swap Image With Custom Field
<?php
add_filter(
'blocksy:woocommerce:product-card:thumbnail:gallery-images',
function ($gallery_images) {
if (! is_product() && ! is_shop() && ! is_product_category()) {
return $gallery_images;
}
global $product;
@tdmrhn
tdmrhn / blc-2-add-quantity+atc-to-product-cards.php
Created March 28, 2024 07:19
Blocksy 2 Add Quantity + Add to Card button to Product Cards via Content Blocks Element
<?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
@tdmrhn
tdmrhn / persona-title-effect.css
Created September 17, 2021 11:51
Persona Title Effect
.blog .page-title::after, .page .page-title::after {
content: attr(title);
position: absolute;
z-index: -1;
top: -7%;
bottom: 0;
width: 100%;
height: 100%;
white-space: nowrap;
display: flex;
@tdmrhn
tdmrhn / woo-single-related-upsells-heading.php
Created October 8, 2025 06:33
Woo Single Product Page Replace Related/Upsells Heading