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
#main { | |
width: 720px; | |
padding: 5px 5px 10px 5px; | |
margin-top: 15px; | |
background-color: #FFF; | |
box-shadow: 3px 5px 3px silver; | |
border-radius: 0 0 5px 5px; | |
border-top: #D31601 4px solid; | |
float: left; | |
} |
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
.post-list { | |
width: 208px; | |
border-radius: 5px; | |
border: #CCC 1px solid; | |
padding: 5px; | |
float: left; | |
margin: 6px; | |
} | |
.post-list h6 { |
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 | |
global $cat; | |
$cats = get_categories(array( | |
'child_of' => $cat, | |
'parent' => $cat, | |
'hide_empty' => 0 | |
)); | |
$c = get_category($cat); | |
if(empty($cats)){ | |
?> |
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
function prohibit_self_pingback( &$links ) { | |
$home = get_option( 'home' ); | |
foreach ( $links as $l => $link ) | |
if ( 0 === strpos( $link, $home ) ) unset($links[$l]); | |
} | |
add_action( 'pre_ping', 'prohibit_self_pingback' ); |
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
/* | |
Theme Name: fangcat v1 | |
Theme URI: http://fangcat.com/ | |
Description: fangcat.com only | |
Version: 1.0 | |
Author: fangcat | |
Author URI: http://fangcat.com/ | |
Tags: | |
*/ |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC] | |
RewriteRule ^feed/?.*$ http://feeds.freegroup.org/freegroup [L,NC,R=301] | |
</IfModule> |
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
add_filter('redirect_canonical', 'stop_guessing'); | |
function stop_guessing($url) { | |
if (is_404()) { | |
return false; | |
} | |
return $url; | |
} |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{QUERY_STRING} !="" | |
RewriteCond %{QUERY_STRING} !^p=.* | |
RewriteCond %{QUERY_STRING} !^s=.* | |
RewriteCond %{REQUEST_URI} !^/wp-admin.* | |
RewriteRule ^(.*)$ /$1? [R=301,L] | |
</IfModule> |
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
/** Disable WordPress Search **/ | |
function fb_filter_query( $query, $error = true ){ | |
if ( is_search() ) { | |
$query->is_search = false; | |
$query->query_vars[s] = false; | |
$query->query[s] = false; | |
// to error | |
if ( $error == true ) | |
$query->is_404 = true; |
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
define ('EMPTY_TRASH_DAYS', 7); |
NewerOlder