Skip to content

Instantly share code, notes, and snippets.

View digimix's full-sized avatar
🎯
Focusing

Digimix digimix

🎯
Focusing
  • Digimix
  • New York City
View GitHub Profile
@digimix
digimix / disable-disqus-custom-post.php
Last active December 8, 2015 18:51
Conditinoally disable Disqus for a Wordpress Custom Post Type
// Disable Disqus for the 'product' Custom Post Type
add_filter( 'comments_template' , __NAMESPACE__ . '\\block_disqus', 1 );
function block_disqus($file) {
global $post, $wp_query;
if ( 'product' == get_post_type() )
remove_filter('comments_template', 'dsq_comments_template');
return $file;
}
@digimix
digimix / git-cheatsheet.md
Created January 19, 2016 22:07 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@digimix
digimix / lc-svg-upload.php
Created January 19, 2016 22:58 — forked from Lewiscowles1986/lc-svg-upload.php
SVG Media Plugin for WordPress (Works since 4.1.2!)
<?php
/*
Plugin Name: SVG Upload
Plugin URI: http://www.lewiscowles.co.uk
Description: Super PHP Plugin to add Full SVG Media support to WordPress, I should live in {$webroot}/wp-content/plugins/ folder ;)
Author: Lewis Cowles
Version: 1.5.2
Author URI: http://www.lewiscowles.co.uk/
*/
namespace lewiscowles\WordPress\Compat\FileTypes;
@digimix
digimix / Contract Killer 3.md
Created January 23, 2016 00:30 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@digimix
digimix / hovereffectideas-saddie.css
Created January 29, 2016 18:41
CodeDrops Hover Effect Ideas Set 1 Saddie
/* http://tympanus.net/Development/HoverEffectIdeas/ */
/*---------------*/
/***** Sadie *****/
/*---------------*/
figure.effect-sadie figcaption::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
@digimix
digimix / local.xml
Created March 11, 2016 19:22 — forked from Maksold/local.xml
Magento XML - local.xml boilerplate
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->
@digimix
digimix / gist:235aec5b3844e99956b2
Created March 11, 2016 21:11 — forked from molotovbliss/gist:2562551
Magento Snippets

Magento Snippets

Set all categories to is_anchor 1

Find attribute_id

SELECT * FROM eav_attribute where attribute_code = 'is_anchor'

Update all of them with anchor_id from above (usually is ID 51)

UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
@digimix
digimix / Convert Custom Taxonomy to Custom Post Type
Created August 1, 2016 05:50 — forked from Strap1/Convert Custom Taxonomy to Custom Post Type
A very hacky and quick way to transfer a Custom Taxonomy to Custom Post Type and transfer associated metadata to Custom Meta Fields. Note: You can use this if it fits your needs, but it is custom to my set up. Use in a testing environment. It's a plugin with no interface, runs on activation and depending on the amount of data, may hit PHP timeou…
<?php
/*
Plugin Name: Convert Custom Taxonomy to Custom Post Type
Plugin URI: N/A
Description: A plugin to convert a Custom Taxonomy to a Custom Post Type and transfer associated metadata.
Version: 0.1
Author: Strap1
Author URI: http:/www.hiphopinenglish.com
/** Convert Taxonomy '%name%' to CPT '%name%' **/
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@digimix
digimix / README.md
Created August 2, 2016 19:39 — forked from jonathantneal/README.md
SASS @font-face mixin

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);