This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('single_template', create_function( | |
'$the_template', | |
'foreach( (array) get_the_category() as $cat ) { | |
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) | |
return TEMPLATEPATH . "/single-{$cat->slug}.php"; } | |
return $the_template;' ) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo date("d/m/Y", strtotime($u['Usuario']['data_nascimento'])); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Acessando | |
mysql -u {mysql-user} -p {mysql-password} -h {mysql-server} | |
// Vendo databases | |
SHOW DATABASES; | |
// entrando no banco e vendo tabelas | |
USE demo; | |
SHOW TABLES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin font($tipo) { | |
@if $tipo == light { | |
font-style: normal; | |
font-weight: 300; | |
} | |
@if $tipo == light-italic { | |
font-style: italic; | |
font-weight: 300; | |
} | |
@if $tipo == normal { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php query_posts(array('showposts' => 6, 'post_parent' => 2, 'post_type' => 'page')); ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<?php the_post_thumbnail(); ?> | |
<h3><?php the_title(); ?></h3> | |
<?php endwhile; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Goodlayers Google Font File | |
* --------------------------------------------------------------------- | |
* @version 1.0 ( last updated at 17/12/2011 ) | |
* @author Goodlayers | |
* @link http://goodlayers.com | |
* @copyright Copyright (c) Goodlayers | |
* --------------------------------------------------------------------- | |
* This file is the replica of the google font array. To update new font | |
* lists, goto https://www.googleapis.com/webfonts/v1/webfonts?key=***** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function() { | |
$('.acao').click(function() { | |
$('.acao-container').fadeToggle(); | |
}); | |
}); | |
</script> | |
<div class="acao"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Gets post cat slug and looks for single-[cat slug].php and applies it | |
add_filter('single_template', create_function( | |
'$the_template', | |
'foreach( (array) get_the_category() as $cat ) { | |
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) | |
return TEMPLATEPATH . "/single-{$cat->slug}.php"; } | |
return $the_template;' ) | |
); |
NewerOlder