This file contains 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 | |
// Tell me the root folder path. | |
// You can also try this one | |
// $home = $_SERVER['DOCUMENT_ROOT']; | |
// Or this | |
// dirname( __FILE__ ) | |
$home = dirname( __FILE__ ); | |
// Is this a Windows host ? If it is, change this line to $windows = true; | |
$windows = false; |
This file contains 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 | |
// Coloque isso no functions.php | |
if ( !function_exists('my_new_gravatar') ) { | |
function cs_new_gravatar( $avatar_defaults ) { | |
// Suba a imagem para a pasta images do tema | |
$myavatar = get_bloginfo('template_directory').'/images/SUAIMAGEM.jpg'; | |
// Inseria o nome do gravar que vai aparecer em Configurações > Discussão | |
$avatar_defaults[$myavatar] = 'NOME DO GRAVATAR'; | |
return $avatar_defaults;} | |
add_filter( 'avatar_defaults', 'cs_new_gravatar' ); |
This file contains 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
$(document).ready(function() { | |
// Placeholder para browsers antigos | |
// Importante usar o placeholder="" corretamente para o script rodar | |
$('input[placeholder]').each(function(){ | |
var ph = $(this).attr('placeholder'); | |
$(this).val(ph).focus(function(){ | |
if($(this).val() == ph) $(this).val(''); | |
}).blur(function(){ | |
if(!$(this).val()) $(this).val(ph); | |
}); |
This file contains 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
/* Text elements */ | |
p {margin-bottom:1.625em;} | |
ul, ol {margin:0 0 1.625em 2.5em;} | |
ul {list-style:circle;} | |
ol {list-style-type:decimal;} | |
ol ol {list-style:upper-alpha;} | |
ol ol ol {list-style:lower-roman;} | |
ol ol ol ol {list-style:lower-alpha;} | |
ul ul, ol ol, ul ol, ol ul {margin-bottom:0;} | |
dl {margin:0 1.625em;} |
This file contains 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 | |
// Custom category posts per page | |
function cs_category_posts_per_page($query) { | |
if (is_category()) { | |
$query->query_vars['posts_per_page'] = 5; | |
return; | |
} | |
} | |
add_filter('pre_get_posts', 'cs_category_posts_per_page'); | |
?> |
This file contains 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
.fb-comments, .fb-comments iframe, .fb_iframe_widget span { | |
width: 100% !important; | |
} |
This file contains 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
<!DOCTYPE html> | |
<html dir="ltr" lang="pt-BR"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8" /> | |
<style> | |
/* oculta o tooltip na hora que carrega a página, é importante ter isso */ | |
.tooltip { | |
display: none; | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Exemplo de Media Types</title> | |
<!-- todos os dispositivos --> | |
<link href="estilos.css" rel="stylesheet" type="text/css" media="all" /> | |
<!-- monitores e com largura máxima de 600px (por exemplo tablets) --> | |
<link href="estilo1.css" rel="stylesheet" type="text/css" media="screen and (max-width: 800px)" /> | |
<!-- apenas para monitores coloridos --> | |
<link href="estilo2.css" rel="stylesheet" type="text/css" media="only screen and (color)" /> |
This file contains 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
<!DOCTYPE html> | |
<html dir="ltr" lang="pt-BR"> | |
<head> | |
<title>Layout Fluido Hibrido - IE Hack</title> | |
<meta charset="UTF-8" /> | |
<!-- CSS --> | |
<style> | |
* {margin:0;padding:0} | |
.clear {clear:both;} | |
#wrap {max-width:960px;min-width:600px;margin:0 auto;} |
OlderNewer