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
/** | |
* Change the placeholder image | |
*/ | |
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); | |
function custom_woocommerce_placeholder_img_src( $src ) { | |
$upload_dir = wp_upload_dir(); | |
$uploads = untrailingslashit( $upload_dir['baseurl'] ); | |
// replace with path to your image | |
$src = $uploads . '/2012/07/thumb1.jpg'; |
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 a custom feed to WordPress. | |
* | |
* The feed will be rendered through the wp-includes/feed-rss2.php template | |
* and avaiable under example.com/feed/{$feed_slug}. | |
* | |
* Note: Don't forget to flush the rewrite rules once. | |
* | |
* @author Dominik Schilling |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Customize the credits | |
add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' ); | |
function sp_footer_creds_text() { | |
echo '<div class="creds"><p>'; | |
echo 'Copyright © '; | |
echo date('Y'); | |
echo ' · <a href="http://mydomain.com">My Custom Link</a> · Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>'; |
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
add_action( 'loop_start', 'display_users_ip_address' ); | |
function display_users_ip_address() { | |
if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { | |
$ip = $_SERVER['HTTP_CLIENT_IP']; | |
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { | |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
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
add_filter( 'wp_nav_menu_items', 'add_search_genesis_menu', 10, 2 ); | |
function add_search_genesis_menu( $menu, $args ) { | |
if ( 'primary' !== $args->theme_location ) | |
return $menu; | |
ob_start(); | |
get_search_form(); | |
$search = ob_get_clean(); | |
$menu .= '<li class="search">' . $search . '</li>'; |
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 | |
//* Template Name: Custom Blog | |
genesis(); |
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
<a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> |
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 position = 0, | |
images = [ | |
'image1.jpg', | |
'image2.jpg', | |
'image3.jpg' | |
]; | |
$.backstretch(images[position]); | |
setInterval(function() { | |
if(position++ > images.length) position = 0; |
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 | |
//* Start the engine | |
include_once( get_template_directory() . '/lib/init.php' ); | |
//* Setup Theme | |
include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' ); | |
//* Set Localization (do not remove) | |
load_child_theme_textdomain( 'outreach', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'outreach' ) ); |
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
/* Column Classes | |
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css | |
--------------------------------------------- */ | |
.five-sixths, | |
.four-sixths, | |
.one-fourth, | |
.one-half, | |
.one-sixth, | |
.one-third, |
NewerOlder