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
add_filter('the_content', 'rss_force_featured_image'); | |
function rss_force_featured_image( $content ) { | |
global $post; | |
if( is_feed() ) { | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$prepend = '<div>' . get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'margin-bottom: 10px;' ) ) . '</div>'; | |
$content = $prepend . $content; | |
} | |
} | |
return $content; |
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
add_action('blocksy:hero:after', 'blocksy_featured_posts', 10); | |
function blocksy_featured_posts(){ | |
if ( is_home() ) { | |
echo do_shortcode ("[blocksy_posts post_ids=10,25,48 limit=3 has_pagination=no]"); | |
} | |
} |
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', function ( $tabs ) { | |
$tabs['my_tab'] = array( | |
'title' => __( 'Blocksy Tab', 'woocommerce' ), | |
'priority' => 20, | |
'callback' => function() { echo do_shortcode( '[blocksy-content-block id="5870"]' ); } | |
); | |
return $tabs; | |
} ); |
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('login_enqueue_scripts', 'login_recaptcha_script'); | |
function login_recaptcha_script() { | |
wp_register_script('recaptcha_login', 'https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key'); | |
wp_enqueue_script('recaptcha_login'); | |
} | |
add_action( 'login_form', 'display_recaptcha_on_login' ); | |
function display_recaptcha_on_login() { | |
echo "<script> function onSubmit(token) { document.getElementById('loginform').submit(); } </script> <button class='g-recaptcha' data-sitekey='YOUR_PUBLIC_KEY' data-callback='onSubmit' data-size='invisible' style='display:none;'>Submit</button>"; |
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
.lightweight-accordion details summary:hover { | |
background:var(--paletteColor3) !important; | |
color:var(--paletteColor8) !important; | |
} | |
.lightweight-accordion details[open] summary { | |
background:var(--paletteColor1) !important; | |
color:var(--paletteColor8) !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
add_action( 'blocksy:woocommerce:product-card:title:after', 'display_attribute_for_variations_size' ); | |
function display_attribute_for_variations_size(){ | |
global $product; | |
$taxonomy = 'pa_size'; | |
if ( $product->get_type() == 'variable' ) { | |
$output = array(); | |
foreach ($product->get_available_variations() as $values) { | |
foreach ( $values['attributes'] as $attr_variation => $term_slug ) { | |
if( $attr_variation === 'attribute_' . $taxonomy ){ |
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( 'login_title', 'blc_wp_new_title' ); | |
add_filter( 'admin_title', 'blc_wp_new_title', 10, 2); | |
function blc_wp_new_title( $login_title ) { | |
return str_replace(array( ' ‹', ' — WordPress'), array( ' ‹', ''),$login_title ); | |
} |
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:hero:after', 'blc_jquery_filter', 10); | |
function blc_jquery_filter() { | |
if ( is_home() ) { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
$('.ct-filter').on( 'click', function(event){ | |
var $type = $(this).data("filter"); | |
if($type == "all"){ |