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
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 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 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 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 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 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 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 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 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 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(); | |
}; |