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
// do shortcodes in the wp nav menu | |
add_filter('wp_nav_menu', 'do_shortcode', 11); |
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
//http://speakinginbytes.com/2012/11/responsive-images-in-wordpress/ | |
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 ); | |
add_filter( 'the_content', 'remove_thumbnail_dimensions', 10 ); | |
function remove_thumbnail_dimensions( $html ) { | |
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); | |
return $html; | |
} |
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
// remove control | |
$wp_customize->remove_control('blogdescription'); | |
// rename existing section | |
$wp_customize->add_section( 'title_tagline' , array( | |
'title' => __('Site Title','mytheme'), | |
'priority' => 20, | |
)); |
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
// remove section | |
$wp_customize->remove_section( 'section_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
// remove control | |
$wp_customize->remove_control('control_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
// rename existing sections | |
$wp_customize->add_section( 'section_id' , array( | |
'title' => __('Section Title','mytheme'), | |
'priority' => 20, | |
)); |
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
killall -9 mysqld |
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
sudo apachectl stop |
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
DELETE pm | |
FROM wp_postmeta pm | |
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id | |
WHERE wp.ID IS NULL |
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 | |
/* | |
Plugin Name: My WooCommerce Modifications | |
Plugin URI: http://woothemes.com/ | |
Description: Modificatinos to my WooCommerce site | |
Version: 1.0 | |
Author: Patrick Rauland | |
Author URI: http://www.patrickrauland.com/ | |
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
*/ |