Skip to content

Instantly share code, notes, and snippets.

View Oliviercreativ's full-sized avatar

Démontant Oliviercreativ

View GitHub Profile
@San3ko
San3ko / test.php
Created January 31, 2012 19:25
php script - icecast server stats (2)
<?php
/*
* SCRIPT CONFIGURATIONS
*/
$SERVER = 'http://myserver.com:8000'; //URL TO YOUR ICECAST SERVER
$STATS_FILE = '/status.xsl'; //PATH TO STATUS.XSL PAGE YOU CAN SEE IN YOUR BROWSER (LEAVE BLANK UNLESS DIFFERENT)
///////////////////// END OF CONFIGURATION --- DO NOT EDIT BELOW THIS LINE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
/* 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;
@spencejs
spencejs / Include Tags In Search
Created March 22, 2013 03:53
Include Tags In Wordpress Search
@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;
@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
@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;
@zvineyard
zvineyard / gist:3361675
Created August 15, 2012 17:12
WordPress: Exclude posts if they are only tagged in a single category (Plugin)
<?php
/*
Plugin Name: Exclude Posts if in Single Category
Description: Exclude posts if they are only tagged in a single category, as defined by the category number. This will show posts in the loop if they are tagged in more than one category.
Version: 1.0
Author: Zac Vineyard
Author URI: http://www.zacvineyard.com
*/
@sniperwolf
sniperwolf / ajax.php
Last active December 29, 2022 12:25
Super-Simple WordPress ajax post-popup with jQuery and Reveal plugin
<?php
/**
* Template Name: ajax
*/
?>
<?php
$post = get_post($_GET['id']);
?>
<?php if ($post) : ?>
<?php setup_postdata($post); ?>
@woogist
woogist / gist:5934881
Created July 5, 2013 14:23
Automatically add product to cart on visit depending on cart total value
/*
* goes in theme functions.php or a custom plugin
**/
// add item to cart on visit depending on cart total value
add_action( 'init', 'add_product_to_cart' );
function add_product_to_cart() {
if ( ! is_admin() ) {
global $woocommerce;
$product_id = 2831;
$found = false;
@laurelstreng
laurelstreng / archive.php
Last active March 13, 2023 18:53
WordPress filtering content with multiple dropdowns, 1 taxonomy with different children, using ajax.
<?php
/**
* The template for displaying archive pages
*/
get_header();
global $wp_query;
?>
<form id="misha_filters" action="#">