Skip to content

Instantly share code, notes, and snippets.

View eliasfaical's full-sized avatar
🏠
Working from home

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
// class dos links que vão receber o click
$(".link-menu").on("click", function(event){
// a animação vai ocorrer no html, body
$('html, body').animate({
// pega o atributo href do this (link que recebeu o click)
// e faz a animação com velocidade 1000 para o destino do href;
scrollTop: $($(this).attr("href")).offset().top
<ul class="products">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 12
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post();
woocommerce_get_template_part( 'content', 'product' );
/* Simulador */
#wc-correios-simulator {
}
/* Título do simulador */
#wc-correios-simulator strong {
}
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Facebook -->
<a href="http://www.facebook.com/sharer.php?u=http://www.simplesharebuttons.com" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/facebook.png" alt="Facebook" /></a>
<!-- Twitter -->
<a href="http://twitter.com/share?url=http://www.simplesharebuttons.com&text=Simple Share Buttons&hashtags=simplesharebuttons" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter" /></a>
<!-- Google+ -->
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@eliasfaical
eliasfaical / functions.php
Last active January 27, 2019 00:40 — forked from claudiosanches/functions.php
WooCommerce - Customizar o summary do content-single-product.php
<?php
// Colar no functions.php
// Para remover os hooks
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing' );
@eliasfaical
eliasfaical / gulpfile.js
Created January 29, 2016 17:48 — forked from mrocha-me/gulpfile.js
Gulp - Project to build site with Jade + Stylus with Livereload & Watch.
/*
Created by: Mauricio Rocha
www.sampapix.com.br
Install the plugins below, use -global or --save-dev either way will work.
gulp, gulp-jade, gulp-concat, gulp-uglify, gulp-minify-css, gulp-stylus, gulp-obfuscate, gulp-connect
Create the folders below inside your project folder:
src, src/js, src/styl
@eliasfaical
eliasfaical / bpdev_get_age_from_dob
Created March 10, 2016 17:02 — forked from sbrajesh/bpdev_get_age_from_dob
Get Age from BuddyPress datebox field data
/**
* Get Age from BuddyPress date of Birth
* @param string $dob_field_name :name of the DOB field in xprofile, like Dob or Date of Birth
* @param int $user_id : the user for which you want to retrieve the age
* @param string $format: the way you want to print the difference, look t <http://php.net/manual/en/dateinterval.format.php> for the acceptable agrs
* @return string :the formatted age in year/month
*/
function bpdev_get_age_from_dob($dob_field_name,$user_id=false,$format="%y Years, %m Month(s), %d days"){
if(!$user_id)