Popup builder on scroll

Avec snippet is on screen if ($(‘.popup-click’).isOnScreen()) { if ($(‘.popup-click.hovered-yet’).length === 0) { var ls = localStorage.getItem(‘namespace.visited’); if (ls == null) {...

Polylang FR | EN

JS $(‘.menu-item.lang-item-fr a’).text(‘FR’); $(‘.menu-item.lang-item-en a’).text(‘EN’); $(‘.menu-item.lang-item-fr’).append(‘ | ‘).append($(‘.menu-item.lang-item-en a’)); CSS...

Disable Dashicons on front-end

// —-Disable Dashicons on front-end function wpdocs_dequeue_dashicon() { if (current_user_can( ‘update_core’ )) { return; } wp_deregister_style(‘dashicons’); } add_action( ‘wp_enqueue_scripts’,...

404 to homepage WP

// 404 to homepage add_action(‘wp’, function() { if (!is_admin() && is_404()) { if ( (defined(‘DOING_CRON’) && DOING_CRON) || (defined(‘XMLRPC_REQUEST’) && XMLRPC_REQUEST) ) { return; } if (...

Auto image alt with image title

$(“img”).each(function() { var img_src = jQuery(this).attr(‘src’); if (typeof img_src !== typeof undefined && img_src !== false) { var img_alt = jQuery(this).attr(‘alt’); var str = img_src var pieces =...