Skip to content

Instantly share code, notes, and snippets.

View Oliviercreativ's full-sized avatar

Démontant Oliviercreativ

View GitHub Profile
@Oliviercreativ
Oliviercreativ / code.scss
Created September 6, 2022 13:09 — forked from rohanb10/code.scss
Staggered Delays for Animations in SCSS
/**
* @param $interval - The interval between each delay, defaults to 500ms
* @param $startTime - The start time of the animations, defaults to 0ms
* @param $numberOfDelays - The total number of delays to be generated, defaults to 10
*/
@mixin delays($interval: 500, $startTime: 0, $numberOfDelays: 10) {
@for $i from 0 through $numberOfDelays {
$ms : $startTime + ($i * $interval);
&.delay-#{$ms} {
animation-delay: #{$ms}ms;
@spivurno
spivurno / gravity-forms-move-progress-bar-bottom.php
Last active October 23, 2023 15:32 — forked from n7studios/gravity-forms-move-progress-bar-bottom.php
Gravity Forms - Move Progress Bar to Bottom of Form
/**
* Plugin Name: Gravity Forms: Move Progress Bar to Bottom of Form
* Plugin URI: http://www.n7studios.co.uk
* Version: 1.0.1
* Author: n7 Studios
* Author URI: http://www.n7studios.co.uk
* Description: Moves the progress bar from the top to the bottom of the Gravity Form. The Start Paging section of the form MUST have a CSS class = progress-bar-bottom
*/
/**
/* Convert the standard WooCommerce products list into a modern responsive grid. */
ul.products {
--grid-gap: 32px;
--auto-grid-min-size: 200px;
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
grid-gap: var(--grid-gap);
display: grid;
}
ul.products:before{
content:unset!important;
@iqbalrony
iqbalrony / wp-cli-commands.txt
Last active September 9, 2022 08:12
WP-CLI Commands which is necessary & most frequently used.
Commands
--------------
Wordpress Download = wp core download
Config.php file create = wp config create --dbname=database_name --dbuser=database_username --dbpass=database_password
Wordpress Install = wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com
Theme or Plugin Install = wp theme/plugin install theme_slug/plugin_slug
Theme or Plugin Activate = wp theme/plugin activate theme_slug/plugin_slug
Theme or Plugin Install & Activate = wp theme/plugin install theme_slug/plugin_slug --activate
@iqbalrony
iqbalrony / functions.php
Created May 10, 2021 17:04 — forked from sh-sabbir/functions.php
Elementor Widget category re-order
<?php
function add_elementor_widget_categories( $elements_manager ) {
$categories = [];
$categories['oceanic'] =
[
'title' => 'Oceanic Widgets',
'icon' => 'fa fa-plug'
];
@workeffortwaste
workeffortwaste / woocommerce-to-css-grid.css
Last active January 22, 2024 15:52
woocommerce-to-css-grid
/* Convert the standard WooCommerce products list into a modern responsive grid. */
ul.products {
--grid-gap: 32px;
--auto-grid-min-size: 200px;
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr));
grid-gap: var(--grid-gap);
display: grid;
}
ul.products:before{
content:unset!important;
@iqbalrony
iqbalrony / elementor-tips-tricks.php
Last active March 20, 2024 05:44
Elementor coding tips tricks. (Exclude & Include example for elementor group control)
<?php
/*
* Exclude & Include in group control
*/
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'item_background',
'label' => __( 'Background', 'happy-addons-pro' ),
'types' => [ 'classic', 'gradient' ],
@enamhasan
enamhasan / Show-inventory Quantity Shopify
Last active March 4, 2022 09:08
Display variant inventory quantiy on product page Shopify
# add this script in product liquid (Just before addtocart form)
<!-- Code added for Inventory in Pipeline -->
<script>
var inv_qty = {};
{% for var in product.variants %}
inv_qty[{{- var.id -}}] = {{ var.inventory_quantity | default: 0 }};
{% endfor %}
</script>
{% if current_variant.inventory_management == "shopify" %}
@rohanb10
rohanb10 / code.scss
Last active November 10, 2022 21:36
Staggered Delays for Animations in SCSS
/**
* @param $interval - The interval between each delay, defaults to 500ms
* @param $startTime - The start time of the animations, defaults to 0ms
* @param $numberOfDelays - The total number of delays to be generated, defaults to 10
*/
@mixin delays($interval: 500, $startTime: 0, $numberOfDelays: 10) {
@for $i from 0 through $numberOfDelays {
$ms : $startTime + ($i * $interval);
&.delay-#{$ms} {
animation-delay: #{$ms}ms;
<?php
/**
* mana functioncust and definitions.
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package mana
*/
if ( ! function_exists( 'mana_setup' ) ) :