This file contains hidden or 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
<script> | |
window.Webflow ||= []; | |
window.Webflow.push(function () { | |
const mask = document.querySelector('#w-slider-mask-1'); | |
const slides = mask ? Array.from(mask.querySelectorAll('.animated-slides.w-slide')) : []; | |
const progressFill = document.querySelector('.slider-progress-fill'); | |
const totalSlides = Math.max(slides.length, 1); | |
function updateProgress(idx) { | |
if (!progressFill) return; | |
const safeIdx = Math.max(0, Math.min(idx, totalSlides - 1)); |
This file contains hidden or 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
add_action('template_redirect', function () { | |
if (!is_user_logged_in() || !current_user_can('manage_options')) { | |
// Display custom error message | |
wp_die( | |
'<h1>Something went wrong!</h1><p>We are experiencing a temporary issue. Please check back soon.</p>', | |
'Error', | |
array('response' => 503) | |
); | |
} | |
}); |
This file contains hidden or 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
<link rel="stylesheet" href="https://unpkg.com/lenis@1.2.3/dist/lenis.css"> | |
<script src="https://unpkg.com/lenis@1.2.3/dist/lenis.min.js"></script> | |
<script> | |
let lenis = new Lenis({ | |
lerp: 0.1, | |
wheelMultiplier: 0.8, | |
gestureOrientation: "vertical", | |
normalizeWheel: false, | |
smoothTouch: false, | |
}); |
This file contains hidden or 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
// 1. Expose taxonomy in REST and register it for products | |
function register_merken_taxonomy_for_rest() { | |
$taxonomy = 'merken'; | |
register_taxonomy_for_object_type($taxonomy, 'product'); | |
$tax = get_taxonomy($taxonomy); | |
if ($tax) { | |
$tax->show_in_rest = true; | |
$tax->rest_base = $taxonomy; |
This file contains hidden or 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
<script> | |
(function() { | |
const animateNumber = (element, target, duration) => { | |
let startTime; | |
const initialNumber = 0; | |
const easingFunction = t => 1 - Math.pow(1 - t, 4); | |
const animate = time => { | |
if (!startTime) startTime = time; |
This file contains hidden or 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
$args = array( | |
'post_type' => 'post', | |
'order' => $settings['order'], | |
'orderby' => $settings['order_by'], | |
'offset' => $offset, | |
'posts_per_page' => $post_per_page, | |
'post__not_in'=> $settings['post_exclude'], | |
'post__in'=> $settings['post_inlude'], | |
'ignore_sticky_posts' => $ignore_sticky_posts | |
); |
This file contains hidden or 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
// elementor fronted view | |
$(window).on("elementor/frontend/init", function () { | |
elementorFrontend.hooks.addAction( | |
"frontend/element_ready/widgetName.default", functionName | |
); | |
}); |
This file contains hidden or 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
/** | |
* Custom Icons package | |
* Call this function in elementor custom widget plugin.php file | |
* @param array $tabs | |
* @return void | |
*/ | |
public function tp_add_custom_icons_tab($tabs = array()) | |
{ | |
// Append new icons |