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 | |
/* This snippet removes the action that inserts thumbnails to products in teh loop | |
* and re-adds the function customized with our wrapper in it. | |
* It applies to all archives with products. | |
* | |
* @original plugin: WooCommerce | |
* @author of snippet: Brian Krogsard | |
*/ | |
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10); |
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
<li class="product"> | |
<a href="http://wp.com/shop/product-title/"> | |
<img width="150" height="150" src="http://wp.com/wp-content/uploads/2012/06/IMAGE-150x150.jpg" class="attachment-shop_catalog wp-post-image" alt="ACCUTACT ANGLESIGHT" title="ACCUTACT ANGLESIGHT"> | |
<h3>Product Title</h3> | |
<span class="price"><span class="amount">$250</span></span> | |
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 | |
/* | |
* goes in theme functions.php or a custom plugin | |
* | |
**/ | |
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); | |
function custom_woocommerce_placeholder_img_src( $src ) { |
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 child_byline( $byline ) { | |
global $post; | |
$byline = '<p class="byline">[entry-terms taxonomy="category"] | [entry-published] | [entry-comments-link zero="Leave a comment" one="1 comment" more="%1$s comments"] [entry-edit-link before=" | "] </p>'; | |
return $byline; | |
} |
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_filter( 'rsseries_title', 'krogs_custom_series_title' ); | |
function krogs_custom_series_title( $title ) { | |
$title = '<h5>' . __('My custom series title') . '</h5>'; | |
return $title; | |
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
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
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 | |
/* | |
* Sample settings page | |
* forked from Tom McFarlin's more extensive example https://github.com/tommcfarlin/WordPress-Settings-Sandbox/ | |
* | |
* @author Brian Krogsgard | |
*/ | |
/** | |
* This function introduces the theme options into a top-level |
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 window_innerwidth = window.innerWidth; | |
if ( window_innerwidth < 630 ) { | |
GA_googleFillSlot( "Skinny-Ad" ); | |
} else if ( window_innerwidth >= 630 && window_innerwidth < 728 ) { | |
GA_googleFillSlot( "In-Line-Ad" ); | |
} else if ( window_innerwidth >= 728 && window_innerwidth < 950 ) { | |
GA_googleFillSlot( "Skinny-Ad" ); | |
} else { | |
GA_googleFillSlot( "In-Line-Ad" ); |
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: Krogsgard enable main site forms and audio | |
* Plugin URI: http://infomedia.com/ | |
* Description: enables a user to use audio and form shortcodes from the main site in sub sites with a wrapper shortcode | |
* Version: 0.1 | |
* Author: Brian Krogsgard | |
* Author URI: http://krogsgard.com/ | |
* Network: true | |
*/ |
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_filter('wpseo_metabox_prio','krogs_lower_wpseo_metabox', 10 ); | |
function krogs_lower_wpseo_metabox( $priority ) { | |
$priority = 'low'; | |
return $priority; | |