Skip to content

Instantly share code, notes, and snippets.

View RhythmShahriar's full-sized avatar
🎯
Focusing

Rhythm Shahriar RhythmShahriar

🎯
Focusing
View GitHub Profile
-- 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');
<?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' );
<?php
/**-------------------------------------------
* @package Code Snippets
* @link http://rhythmshahriar.com/code/
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
/** Modify the author box title */
add_filter( 'genesis_author_box_title', 'rs_author_box_title' );
<?php
/**-------------------------------------------
* @package Code Snippets
* @link http://rhythmshahriar.com/code/
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
/** Modify the size of the Gravatar in the author box */
add_filter( 'genesis_author_box_gravatar_size', 'rs_author_box_gravatar_size' );
<?php
/**-------------------------------------------
* @package Code Snippets
* @link http://rhythmshahriar.com/code/
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
/** Customize breadcrumbs display */
add_filter( 'genesis_breadcrumb_args', 'rs_breadcrumb_args' );
<?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');
<?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');
<?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 () {
<?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()) {
<?php
/**-------------------------------------------
* @package Code Snippets
* @link http://rhythmshahriar.com/code/
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
//Customize search form button
add_filter( 'genesis_search_button_text', 'rs_search_button_text' );
function rs_search_button_text( $text ) {