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
/*-----------------------------------------------------------------------------------*/ | |
/* Set custom excerpt length */ | |
/*-----------------------------------------------------------------------------------*/ | |
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); | |
function custom_excerpt_length( $length ) { | |
global $excerpt_length; | |
if ( $excerpt_length ) { |
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(){ | |
// Source: http://stackoverflow.com/a/7973317/851045 | |
$('ul.sub-category').each(function(){ | |
var max = 3 | |
if ($(this).find("li").length > max+1) { | |
$(this) | |
.find('li:gt('+max+')') | |
.hide() | |
.end() |
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
var intH = 0, | |
finH = 40; | |
$(document).ready(function(){ | |
$("#topbar").click(function () { | |
$(this).animate({ | |
height: ($(this).height() == finH) ? intH : finH | |
}, 200); | |
}); |
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 | |
update_option( 'thumbnail_size_h', 150 ); | |
update_option( 'thumbnail_size_w', 150 ); | |
update_option( 'medium_size_h', 500 ); | |
update_option( 'medium_size_w', 500 ); | |
update_option( 'large_size_h', 1000 ); | |
update_option( 'large_size_w', 1000 ); |
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 | |
/** | |
* Redirect non-admins to the homepage after logging into the site. | |
* | |
*/ | |
function my_login_redirect ( $redirect_to, $request, $user ) { | |
return ( is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) ? admin_url() : site_url(); | |
} // end my_login_redirect | |
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 ); |
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 | |
$yahooID = "YOUR_ID"; | |
$status = file_get_contents("http://opi.yahoo.com/online?u=".$yahooID."&m=a&t=1"); | |
if ($status === '00') { | |
echo "OFFLINE!"; | |
} else if ($status === '01') { | |
echo "ONLINE!"; |
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
/** | |
* Equal Height Rows - Responsive | |
* | |
* Source: | |
* http://codepen.io/micahgodbolt/pen/FgqLc?editors=101 | |
* http://css-tricks.com/equal-height-blocks-in-rows/ | |
* | |
*/ | |
equalheight = function(container){ |
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 | |
/** | |
* Add class to next/previous post links | |
* | |
* Add class to links generated by next_posts_link | |
* and previous_posts_link | |
*/ | |
if ( ! function_exists( 'posts_link_attributes_prev' ) || ! function_exists( 'posts_link_attributes_next' ) ) { | |
function posts_link_attributes_prev() { |
OlderNewer