Skip to content

Instantly share code, notes, and snippets.

View dmassiani's full-sized avatar
👾
Resport

Carolinus dmassiani

👾
Resport
View GitHub Profile
@dmassiani
dmassiani / pagenavi html
Created April 2, 2013 07:33
Change html for wp pagenavi
######################
# Change html pagenavi for transform like bootstrap
######################
//attach our function to the wp_pagenavi filter
add_filter( 'wp_pagenavi', 'wd_pagination', 10, 2 );
//customize the PageNavi HTML before it is output
function wd_pagination($html) {
$out = '';
@dmassiani
dmassiani / Scrollto
Created April 3, 2013 14:04
Scroll To
$('#bottom').click(function() {
$(documentBody).animate({scrollTop: $('#top').offset().top}, 2000,'easeInOutCubic');
});
@dmassiani
dmassiani / grid-calcul
Created April 4, 2013 06:37
Méthode de calcul d'un grid
Columns : 12
Grid Columns : 60px
Grid Gutter : 30px
-------------------------------------------------------------------
Grid Columns X Columns = GC
Grid Gutter X ( Columns - 1 ) = GG
-------------------------------------------------------------------
@dmassiani
dmassiani / new_gist_file
Created April 18, 2013 06:36
Clearfix after N columns
<?php
if( ($new->current_post % 3) == 2 ){
?>
<div class="clearfix"></div>
<?php
}
?>
@dmassiani
dmassiani / new_gist_file
Created April 19, 2013 15:55
Animated Custom Scroll anchor
function scrollToAnchor(aid,v){
var aTag = $(aid);
$('html,body').animate({scrollTop: aTag.offset().top - 60},v);
}
$(document).ready(function(){
$('.subnav').waypoint('sticky');
$('.subnav a').on('click',function(){
@dmassiani
dmassiani / new_gist_file
Created August 13, 2013 14:57
Sublime text replace simple quotes html by double quotes
REGEX Sublime Text de remplacement des simples quotes par des doubles (et inversement)
(en plus d'ajouter le plugin "toggle quotes")
Find '(.*?)'
Where <open files>
Replace "$1"
Verifying that +davidmassiani is my blockchain ID. https://onename.com/davidmassiani
https://fr.wordpress.org/plugins/safe-attachment-names/
https://fr.wordpress.org/plugins/advanced-custom-fields/
https://fr.wordpress.org/plugins/regenerate-thumbnails/
https://fr.wordpress.org/plugins/wp-pagenavi/
https://fr.wordpress.org/plugins/redirection/
https://fr.wordpress.org/plugins/post-types-order/
https://fr.wordpress.org/plugins/user-role-editor/
https://fr.wordpress.org/plugins/wpcomponent/
https://wordpress.org/plugins/slate-admin-theme/
@dmassiani
dmassiani / component-full-example.php
Last active September 26, 2016 18:50
WordPress Component - Full Example
<?php
/*
Template Name: Full Example
Description: Full example component
---------------------------------------------------------------------
{"type": "title", "name": "Title", "slug": "title"}
{"type": "editor", "name": "Content", "slug": "content"}
{"type": "image", "name": "Illustration", "slug": "illustration"}
{"type": "link", "name": "Link", "slug": "link"}
{"type": "id", "name": "Id", "slug": "id"}
@dmassiani
dmassiani / simple-component-extract
Created October 26, 2016 11:54
Simple Component Extract
<?php the_component('slug'); ?>