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( 'post_thumbnail_html', 'remove_width_attribute', 10 ); | |
add_filter( 'image_send_to_editor', 'remove_width_attribute', 10 ); | |
function remove_width_attribute( $html ) { | |
$html = preg_replace( '/(width|height)="\d*"\s/', "", $html ); | |
return $html; | |
} |
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
<div id="advertisement" class="mfp-hide"> | |
<div class="wrap group text-center"> | |
<img src="http://placehold.it/800x600"/> | |
<p><a href="javascript:;" id="closeAd" class="button"><i class="fa fa-close"></i> Nicht mehr anzeigen</a></p> | |
</div> | |
</div> | |
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.cookie.js"></script> | |
<script> | |
$(document).ready(function () { | |
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 | |
$today = date_i18n('Ymd'); | |
$args = array( | |
'post_type' => 'events', | |
'posts_per_page' => -1, | |
'meta_key' => 'event_date', | |
'meta_compare' => '>=', | |
'meta_value' => $today, | |
'orderby' => 'meta_value', | |
'order' => 'asc', |
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 | |
function mv_browser_body_class($classes) { | |
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; | |
if($is_lynx) $classes[] = 'lynx'; | |
elseif($is_gecko) $classes[] = 'gecko'; | |
elseif($is_opera) $classes[] = 'opera'; | |
elseif($is_NS4) $classes[] = 'ns4'; | |
elseif($is_safari) $classes[] = 'safari'; | |
elseif($is_chrome) $classes[] = 'chrome'; |
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
<div id="container"> | |
<?php if( have_rows('projektinfos') ): ?> | |
<?php while ( have_rows('faq') ) : the_row(); ?> | |
<h2 class="headline"><?php the_sub_field('faq-head'); ?></h2> | |
<div class="copytext"><?php the_sub_field('faq-copy'); ?></div> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<p><mark>Noch keine Repeater Felder angegeben</mark></p> |
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
ul li { | |
position:relative; | |
padding: .2em 0 .2em 1em; | |
margin: 0; | |
} | |
ul li:before { | |
position: absolute; | |
top: .4em; | |
left: 0; | |
content: '\f054'; |
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
<!-- Get Taxonomy Title from active Taxonomy --> | |
<?php // https://wordpress.org/support/topic/taxonomy-title-output ?> | |
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?> | |
<!-- List all Taxonomy Terms that are assigned --> | |
<?php // https://codex.wordpress.org/Function_Reference/the_terms ?> | |
<?php the_terms( $post->ID, 'glossary-categories', '', ', ', ''); ?> |
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
ol.custom-counter { | |
margin: 1em 0 1em 2em; | |
padding: 0; | |
list-style-type: none; | |
} | |
ol.custom-counter li { | |
position: relative; | |
counter-increment: step-counter; | |
margin-bottom: .5em; | |
} |
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 site-id class to body functions.php | |
add_filter('body_class', 'multisite_body_classes'); | |
function multisite_body_classes($classes) { | |
$id = get_current_blog_id(); | |
$classes[] = 'site-id-'.$id; | |
return $classes; | |
} |
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
<div id="map" style="height: 420px; width: 100%;"></div> | |
<script> | |
function initMap() { | |
var mapDiv = document.getElementById('map'); | |
var myLatLng = {lat: 52.251458, lng: -0.118886}; | |
var map = new google.maps.Map(mapDiv, { | |
center: myLatLng, | |
zoom: 15 | |
}); |