Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ellocofray's full-sized avatar

Federico Ciliberti ellocofray

View GitHub Profile
@ellocofray
ellocofray / ele-loop-slider.html
Created April 8, 2024 21:09 — forked from aCodeDragon/ele-loop-slider.html
Elementor Loop Grid Custom Slider using Swiper
<script>
//Loop Posts Slider
//NOTE:IF using custom code in Elementor Settings, this needs to be wrapped in window.addEventListener('load', ()=>{}) to ensure all Elementor scripts are loaded
window.addEventListener('load',()=>{
const sContainer = document.querySelector(".your-class-name .elementor-widget-container");
const sWrapper = document.querySelector(".your-class-name .elementor-loop-container");
let sSlide = document.querySelectorAll('.e-loop-item');
sContainer.classList.add("swiper-container");
sWrapper.classList.add("swiper-wrapper");
@ellocofray
ellocofray / custom-css.php
Created November 22, 2023 11:56 — forked from iqbalrony/custom-css.php
How to add custom css control with elementor free version.
<?php
use Elementor\Controls_Manager;
use Elementor\Element_Base;
use Elementor\Core\Files\CSS\Post;
use Elementor\Core\DynamicTags\Dynamic_CSS;
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
@ellocofray
ellocofray / WP_flush_cache_and_transients.php
Created January 14, 2020 00:02 — forked from Jany-M/WP_flush_cache_and_transients.php
[WordPress] Flush Object Cache (Memcached) & Transients - Admin buttons
<?php
// Flush Cache from Admin bar
function flush_memcache_button() {
global $wp_admin_bar;
// If User isnt even logged in or if admin bar is disabled
if ( !is_user_logged_in() || !is_admin_bar_showing() )
return false;
@ellocofray
ellocofray / gist:2813731c445f04eea3d62ee5e822be9e
Last active April 26, 2019 15:14 — forked from vsudilov/gist:ba05178f31079957e855
filesystem over ssh tunnel through gateway (ssh+sshfs)
ssh -f -N -L LOCAL_PORT:FROM_HOST_TO_WHERE:REMOTE_PORT gateway.host
sshfs -p LOCAL_PORT user@localhost:/nfs_mount /local/mountpoint -o reconnect