Skip to content

Instantly share code, notes, and snippets.

View flymke's full-sized avatar

Michael Schönrock flymke

View GitHub Profile
@flymke
flymke / santapress_custom.css
Last active November 28, 2020 12:26
SantaPress - Custom CSS - https://santapress.halloecho.de
/* disable Santa hat */
.santapress-post.modal:before { display:none; }
/* disable snow */
.santapress-post.modal:after { display:none; }
/* make 4 doors in a row */
@media only screen and (min-width: 768px) {
.santapress-container .santapress-door {
width: 25% !important;
@flymke
flymke / functions_avada-disable-bs-modal-1.php
Created November 6, 2020 20:46
SantaPress: How to disable bootstrap-modal in Avada
/* disable bootstrap-modal in Avada globally */
add_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' );
function custom_disable_theme_js() {
Fusion_Dynamic_JS::deregister_script('bootstrap-modal');
}
@flymke
flymke / single-door.php
Created November 9, 2020 14:21
single-door.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WP_Bootstrap_Starter
*/
get_header(); ?>
@flymke
flymke / custom.js
Created March 16, 2021 11:44
Elementor PRO smartmenus.js - show submenu on click instead of hover
jQuery(function($) {
$('.elementor-nav-menu').on('beforeshow.smapi', function(e, menu) { return false; });
$('.menu-item-has-children > a').attr('href', 'javascript:void(0);');
$('.menu-item-has-children > a').click(function() {
$(this).parent().find('.sub-menu').toggle();
});
});
@flymke
flymke / input.scss
Created April 12, 2021 23:03
Generated by SassMeister.com.
$primary: '#555';
$grey: '#eee';
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
);
@flymke
flymke / functions.php
Created October 5, 2021 10:19
santapress - allow comments on single door pages
function santapress_allow_comments() {
add_post_type_support( 'door', 'comments' );
}
add_action('init', 'santapress_allow_comments');
@flymke
flymke / custom.css
Last active November 25, 2022 20:08
SantaPress - make more doors in a row on mobile devices
/* make 4 doors in a row */
@media only screen and (max-width: 767px) {
.santapress-container .santapress-door {
width: 25% !important;
flex: 1 0 25% !important;
}
}
/* make 4 doors in a row without stretching the last element */
@media only screen and (max-width: 767px) {
@flymke
flymke / functions.php
Last active November 19, 2021 08:20
SantaPress - play audio file when opening a door
add_action( 'wp_head', function () { ?>
<script>
/* Audio file attribution
Merry Christmas sound effects from Air Media
www.airmedia.co
https://freesound.org/s/349855/
This work is licensed under the Creative Commons 0 License.
*/
@flymke
flymke / custom.css
Created November 19, 2021 10:27
SantaPress - Prevent flickering on iPhone
body.santapress-snow-modal.modal-open .blocker:after {
-webkit-backface-visibility: hidden;
}
@flymke
flymke / functions.php
Created November 26, 2021 08:45
SantaPress - leave past doors visually open
add_action( 'wp_head', function () { ?>
<script>
jQuery(document).ready(function($){
$('.santapress-door.status-publish:not(:last)').find('img').css('transform', 'perspective(1200px) translateZ(0px) translateX(0px) translateY(0px) rotateY(-45deg)');
});
</script>
<?php } );