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
function wpse_media_extra_column( $cols ) { | |
$cols["alt"] = "ALT"; | |
return $cols; | |
} | |
function wpse_media_extra_column_value( $column_name, $id ) { | |
if( $column_name == 'alt' ) | |
echo get_post_meta( $id, '_wp_attachment_image_alt', true); | |
} | |
add_filter( 'manage_media_columns', 'wpse_media_extra_column' ); | |
add_action( 'manage_media_custom_column', 'wpse_media_extra_column_value', 10, 2 ); |
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
.class { | |
outline: none !important; | |
border: none !important; | |
-webkit-box-shadow: none !important; | |
-moz-box-shadow: none !important; | |
box-shadow: none !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 echo do_shortcode( $YOUR_GLOBAL_NAME['YOUR_FIELD_ID'] ); ?> |
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
$(function () { | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > 70) { | |
$('.intro-link').fadeOut(400); | |
} else { | |
$('.intro-link').fadeIn(); | |
} | |
}); | |
}); |
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
(function(){ | |
var htmlTag = document.getElementsByTagName("html")[0]; | |
if ( navigator.userAgent.indexOf("MSIE 10.0") > -1 ) { | |
htmlTag.className += ' ie10'; | |
} | |
if ( !!navigator.userAgent.match(/Trident.*rv\:11\./) ) { | |
htmlTag.className += ' ie11'; | |
} |
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
function sc_loop_highlights_lehrer() { | |
$args = array( 'post_type' => 'lehrer', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => array('publish'), | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'highlights', | |
'field' => 'slug', | |
'terms' => array('ja') | |
) | |
) | |
); |
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
// Outside the loop: | |
<?php | |
$post_id = 11; | |
$post = get_post($post_id); | |
$slug = $post->post_name; | |
?> |
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
/* $('a[href*="#"]:not([href="#"])').click(function() { */ | |
$('.scroll').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000 ); | |
return false; |
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
function shop_widgets() { | |
register_sidebar( array( | |
'name' => 'Shop – Footer 1', | |
'id' => 'shop-footer-1', | |
'before_widget' => '<div id="%1$s" class="cb-footer-widget %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h3 class="cb-footer-widget-title"><span>', | |
'after_title' => '</span></h3>' | |
) ); |
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
$(this).parent().addClass('newClass'); |