Skip to content

Instantly share code, notes, and snippets.

//http://jsfiddle.net/RokoCB/tw6g2oeu/7/
(function($, win) {
$.fn.inViewport = function(cb) {
return this.each(function(i,el){
function visPx(){
var H = $(this).height(),
r = el.getBoundingClientRect(), t=r.top, b=r.bottom;
return cb.call(el, Math.max(0, t>0? H-t : (b<H?b:H)));
} visPx();
<?php echo get_stylesheet_directory_uri(); ?>/assets/img/favicon.ico"
$blogcat = get_terms('cl-post-tax');
// Always show link in WP backend on custom post type or posts category
(example: https://clevis.sunlime.io/wp-admin/edit-tags.php?taxonomy=cl-post-tax&post_type=cl-post)
...
if($the_query->have_posts()) :
echo '<div class="category-filter">';
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
#myElement {
/* Enter your style code */
}
}
// check original function befor override
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
add_action( 'woocommerce_shop_loop_item_title', 'add_custom_title', 10);
function add_custom_title() {
echo '<h2 class="woocommerce-loop-product__title">'.str_replace('ß', 'ss', get_the_title()).'</h2>';
}
$argsref = array(
'post_type' => 'referenz',
'posts_per_page' => -1,
'meta_query' => array(
'key' => 'kp_referenz_featured', //checkbox created with acf
'value' => '1' // check if true
)
);
.child {
position: absolute;
top: 50%; /* position the top edge of the element at the middle of the parent */
left: 50%; /* position the left edge of the element at the middle of the parent */
transform: translate(-50%, -50%); /* This is a shorthand of
translateX(-50%) and translateY(-50%) */
}
font-feature-settings: 'liga'; /* Support for IE */
$(window).load(function () {
// Do something
});