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 | |
// adicionar isso no functions.php | |
function dfw_remove_website_field($field) { | |
if(isset($field['url'])) { | |
unset($field['url']); | |
} | |
return $field; | |
} | |
add_filter('comment_form_default_fields', 'dfw_remove_website_field'); | |
?> |
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
RedirectMatch 301 ^/wp-content/uploads/(.*)$ http://midia.seudominio.com/$1 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Input with CSS3 transition</title> | |
<style> | |
#search { | |
width: 150px; | |
-webkit-transition: all 0.4s ease; | |
-moz-transition: all 0.4s ease; |
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
// Order post by modified date | |
function dfw_query_orderby_modified($query) { | |
if (is_home() || is_home() && is_paged()) { | |
$query->query_vars['orderby'] = 'modified'; | |
return; | |
} | |
} | |
add_filter('pre_get_posts', 'dfw_query_orderby_modified'); |
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
<!-- Mostra a data como: 28/06/2012 às 01h44 --> | |
<div class="entry-modified-data"><?php the_modified_date('d/m/Y \à\s H\hi'); ?></div> |
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 | |
// Colocar isso daqui no wp-config.php: | |
define('WP_SITEURL', 'http://example.com/wordpress'); | |
define('WP_HOME', 'http://example.com/wordpress'); | |
// não esqueça de arrumar os endereços para o seu |
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 | |
/** | |
* Pagination. | |
*/ | |
function dfw_pagination() { | |
global $wp_query; | |
$total_pages = $wp_query->max_num_pages; | |
if ($total_pages > 1) { | |
$current_page = max( 1, get_query_var( 'paged' ) ); |
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 | |
/** | |
* Related Posts. | |
* | |
* Usage: | |
* To show related by categories: | |
* Add in single.php <?php dfw_related_posts(); ?>. | |
* To show related by tags: | |
* Add in single.php <?php dfw_related_posts('tag'); ?>. |
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
jQuery(document).ready(function($) { | |
$('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 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 | |
// Add metabox | |
function dfw_slideshow_metabox() { | |
add_meta_box( | |
'dfw-metabox', | |
'Slideshow', | |
'dfw_slideshow_metabox_content', | |
'post', | |
'side' | |
); |