Skip to content

Instantly share code, notes, and snippets.

.no-mix-blend-mode .class {
opacity: .75;
}
@ingozoell
ingozoell / Remove Style iOS Tel.css
Last active June 13, 2017 16:18
html Remove Style iOS Tel
html a[href^="tel"] {
text-decoration: none !important;
}
@ingozoell
ingozoell / WP Shortcode CSS Tab.css
Last active June 13, 2017 12:53
WP Shortcode CSS Tab
.iz_tab {
display: inline-block;
}
@ingozoell
ingozoell / iOS Checkbox Reset.css
Created June 12, 2017 17:55
iOS Checkbox Reset Webkit/Safari
input[type="checkbox"] {
-webkit-appearance: none;
}
input[type="checkbox"]:checked {
-webkit-appearance: checkbox;
}
@ingozoell
ingozoell / WP Shortcode.php
Created June 12, 2017 12:51
WP Shortcode
// Add Shortcode
function fn_marker_pink( $atts, $content = null ) {
// Attributes
extract( shortcode_atts(
array(
'color' => '#cf599b',
'fett' => '400'
), $atts )
);
<script>
WebFontConfig = {
typekit: { id: 'xxxxxx' }
};
(function(d) {
var wf = d.createElement('script'), s = d.scripts[0];
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
wf.async = true;
s.parentNode.insertBefore(wf, s);
@ingozoell
ingozoell / wp_bg_image.php
Created March 20, 2017 18:29
Post thumbnail as background image inline
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?>
<div id="post" class"your-class" style="background-image: url('<?php echo $thumb['0'];?>')">
<p>text demo</p>
</div>
@ingozoell
ingozoell / wp_redirect_non_admin_user.php
Created March 17, 2017 16:51
Redirect Non Admin User to frontend
function redirect_non_admin_user(){
if ( !defined( 'DOING_AJAX' ) && !current_user_can('administrator') ){
wp_redirect( site_url() ); exit;
}
}
add_action( 'admin_init', 'redirect_non_admin_user' );
@ingozoell
ingozoell / svg_check.js
Created March 13, 2017 11:59
SVG Check/ Fallback without jQuery and Modernizr
if (!Modernizr.svg) {
var imgs = document.getElementsByTagName('img');
var endsWithDotSvg = /.*\.svg$/
var i = 0;
var l = imgs.length;
for(; i != l; ++i) {
if(imgs[i].src.match(endsWithDotSvg)) {
imgs[i].src = imgs[i].src.slice(0, -3) + 'png';
}
}
.class {
-webkit-overflow-scrolling: touch;
}