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 function add_video_suffix( $title, $id = null ) { | |
if( in_the_loop() && in_category( 'Videos', $id ) ) { | |
$title .= ' [VIDEO]'; | |
} | |
return $title; | |
} | |
add_filter( 'the_title', 'add_video_suffix' ); |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com'); |
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 | |
/** | |
* Return Archive Section | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/helper-function-for-template-include-and-body-class/ | |
* | |
* @param null | |
* @return string | |
*/ |
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
/* | |
* | |
* Icon index | |
* by @dic7 (github: ivanmendoza) | |
* | |
*/ | |
/* | |
* SPRITE | |
* url: ../images/icons.png |
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 | |
if ( ! function_exists( 'wp_new_user_notification' ) ) : | |
function wp_new_user_notification( $user_id, $plaintext_pass = '' ) { | |
// Return early if no password is set. | |
if ( empty( $plaintext_pass ) ) { | |
return; | |
} | |
$user = get_userdata( $user_id ); |
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 remove_jetpack_styles(){ | |
wp_deregister_style('AtD_style'); // After the Deadline | |
wp_deregister_style('jetpack-carousel'); // Carousel | |
wp_deregister_style('jetpack-slideshow'); // Jetpack Slideshow | |
wp_deregister_style('grunion.css'); // Grunion contact form | |
wp_deregister_style('the-neverending-homepage'); // Infinite Scroll | |
wp_deregister_style('infinity-twentyten'); // Infinite Scroll - Twentyten Theme | |
wp_deregister_style('infinity-twentyeleven'); // Infinite Scroll - Twentyeleven Theme | |
wp_deregister_style('infinity-twentytwelve'); // Infinite Scroll - Twentytwelve Theme | |
wp_deregister_style('noticons'); // Notes |
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 | |
// First, make sure Jetpack doesn't concatenate all its CSS | |
add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
// Then, remove each CSS file, one at a time | |
// You probably won't need them all, unless you use all the modules, and all the themes! :) | |
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers | |
function jeherve_remove_all_jp_css() { | |
wp_deregister_style( 'AtD_style' ); // After the Deadline |
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
.lt-ie9 .top-bar { | |
background: #2f2f2f; | |
*zoom: 1; | |
overflow: visible; | |
} | |
.lt-ie9 .top-bar:before, .lt-ie9 .top-bar:after { | |
content: " "; | |
display: table; | |
} | |
.lt-ie9 .top-bar:after { clear: both; } |
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 | |
///////Example usage////////// | |
//get object terms for $post->ID with taxonomies categories and tags, | |
//args set as fields all and exclude term with id 1 | |
$terms = wp_get_object_terms( | |
$post->ID, | |
array( |
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 | |
// http://johnford.is/programmatically-pull-attachments-from-wordpress-posts/ | |
// http://www.wprecipes.com/how-to-show-wordpress-post-attachments | |
// get all of the images attached to the current post | |
function _get_images($size = 'thumbnail') { | |
global $post; | |
$photos = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ); |
OlderNewer