This file contains hidden or 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_filter('blocksy:general:shortcodes:blocksy-posts:args', function ($args) { | |
$args['offset'] = 5; | |
return $args; | |
} ); |
This file contains hidden or 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
@media (min-width: 1000px) { | |
.entries[data-layout="simple"] { | |
display: grid; | |
grid-template-columns: repeat(2, 1fr); | |
grid-column-gap: var(--grid-columns-gap, 30px); | |
} | |
} |
This file contains hidden or 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
@media (max-width: 690px) { | |
[data-layout="simple"] article { flex-direction: initial !important; } | |
[data-layout="simple"] article > .ct-image-container { margin-bottom: 0; margin-right: 0; max-width: 30%; } | |
[data-layout="simple"] article > .ct-image-container img { height: auto !important; } | |
} |
This file contains hidden or 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( 'after_setup_theme', function() { | |
add_theme_support( 'responsive-embeds' ); | |
} ); |
This file contains hidden or 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( 'phpmailer_init', function ( $phpmailer ) { | |
$phpmailer->isSMTP(); | |
$phpmailer->IsHTML(true); | |
$phpmailer->Host = "smtp.suprd.com"; | |
$phpmailer->Port = "465"; | |
$phpmailer->Username = "[email protected]"; | |
$phpmailer->Password = "xxx"; | |
$phpmailer->SMTPAuth = true; | |
$phpmailer->SMTPSecure = "ssl"; |
This file contains hidden or 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
jQuery(document).ready(function($) { | |
$(".tabcontents .content").hide(); | |
$(".tabs a:first").addClass("active").show(); | |
$(".tabcontents .content").hide().filter(":first").show(); | |
$(".tabs a").click(function() { | |
$(".tabs > a").removeClass("active"); | |
$(this).addClass("active"); | |
$(".tabcontents .content").hide(); | |
var activeTab = $(this).attr("href"); | |
$(activeTab).show(); |
This file contains hidden or 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( 'register_form', 'blc_registration_form' ); | |
function blc_registration_form() { | |
$year = ! empty( $_POST['year_of_birth'] ) ? intval( $_POST['year_of_birth'] ) : ''; | |
?> | |
<p> | |
<label for="year_of_birth"><?php esc_html_e( 'Year of birth', 'blc' ) ?><br/> | |
<input type="number" |
This file contains hidden or 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('woocommerce_after_shop_loop_item_title', 'add_description_to_product_card', 3 ); | |
function add_description_to_product_card() { | |
global $product; | |
$limit = 10; | |
$description = $product->get_description(); | |
if (str_word_count($description, 0) > $limit) { | |
$words = str_word_count($description, 2); | |
$pos = array_keys($words); | |
$excerpt = substr($description, 0, $pos[$limit]) . '...'; |
This file contains hidden or 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_filter( 'woocommerce_product_tabs', 'blc_marge_decription_reviews_tabs', 99 ); | |
function blc_marge_decription_reviews_tabs( $tabs ) { | |
unset( $tabs['reviews'] ); | |
$tabs['description']['callback'] = function() { | |
global $post, $product; | |
the_content(); | |
echo '<h2>Reviews</h2>'; | |
comments_template(); | |
}; |
This file contains hidden or 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( 'template_redirect', 'woo_custom_redirect_after_purchase' ); | |
function woo_custom_redirect_after_purchase() { | |
global $wp; | |
if ( is_checkout() && !empty( $wp->query_vars['order-received'] ) ) { | |
wp_redirect( '/custom-thank-you/' ); | |
exit; | |
} | |
} |