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
-- package Code Snippets | |
-- link http://rhythmshahriar.com/code/ | |
-- author Rhythm <[email protected]> | |
-- copyright Copyright (c) 2013, Rhythm Shahriar | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.youroldsite.com', 'http://www.yournewsite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.youroldsite.com','http://www.yournewsite.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.youroldsite.com', 'http://www.yournewsite.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.youroldsite.com', 'http://www.yournewsite.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 | |
/**------------------------------------------- | |
* @package Code Snippets | |
* @link http://rhythmshahriar.com/code/ | |
* @author Rhythm <[email protected]> | |
* @copyright Copyright (c) 2013, Rhythm Shahriar | |
-------------------------------------------------*/ | |
// Display a custom favicon on Genesis | |
add_filter( 'genesis_pre_load_favicon', 'rs_custom_favicon' ); |
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 | |
/**------------------------------------------- | |
* @package Code Snippets | |
* @link http://rhythmshahriar.com/code/ | |
* @author Rhythm <[email protected]> | |
* @copyright Copyright (c) 2013, Rhythm Shahriar | |
-------------------------------------------------*/ | |
// Customize Next Previous Page Nav | |
add_filter('genesis_prev_link_text','rs_prev_page_text'); |
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 | |
/**------------------------------------------- | |
* @package Code Snippets | |
* @link http://rhythmshahriar.com/code/ | |
* @author Rhythm <[email protected]> | |
* @copyright Copyright (c) 2013, Rhythm Shahriar | |
-------------------------------------------------*/ | |
// Modify the WordPress read more link | |
add_filter('excerpt_more','rs_custom_read_more'); | |
add_filter('get_the_content_more_link','rs_custom_read_more'); |
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 | |
/**------------------------------------------- | |
* @package Code Snippets | |
* @link http://rhythmshahriar.com/code/ | |
* @author Rhythm <[email protected]> | |
* @copyright Copyright (c) 2013, Rhythm Shahriar | |
-------------------------------------------------*/ | |
add_action( 'wp_head', 'rs_google_tracking_code' ); | |
function rs_google_tracking_code () { |
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 | |
/**------------------------------------------- | |
* @package Code Snippets | |
* @link http://rhythmshahriar.com/code/ | |
* @author Rhythm <[email protected]> | |
* @copyright Copyright (c) 2013, Rhythm Shahriar | |
-------------------------------------------------*/ | |
// jQuery Management | |
function modify_jquery() { | |
if (!is_admin()) { |