This file contains hidden or 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 | |
/** | |
* krogs_child_theme_new_menu_size function. | |
* | |
*/ | |
add_filter( 'krogs_theme_small_menu_size', 'krogs_child_theme_new_menu_size' ); | |
function krogs_child_theme_new_menu_size( $size ) { | |
$size = 450; |
This file contains hidden or 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
<header id="masthead" class="site-header" role="banner"> | |
<hgroup> | |
<h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> | |
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> | |
</hgroup> | |
<nav role="navigation" class="site-navigation main-navigation"> | |
<h1 class="assistive-text"><?php _e( 'Menu', '_s' ); ?></h1> | |
<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', '_s' ); ?>"><?php _e( 'Skip to content', '_s' ); ?></a></div> |
This file contains hidden or 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
/** | |
* Handles toggling the main navigation menu for small screens. | |
*/ | |
jQuery( document ).ready( function( $ ) { | |
var $masthead = $( '#masthead' ), | |
timeout = false; | |
$.fn.smallMenu = function() { | |
$masthead.find( '.site-navigation' ).removeClass( 'main-navigation' ).addClass( 'main-small-navigation' ); | |
$masthead.find( '.site-navigation h1' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' ); |
This file contains hidden or 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 poststatus_get_love_it() { | |
if ( 'post' == get_post_type() ) { | |
$love_output = lip_love_it_link( $post_id = get_the_ID(), $link_text = ' <div class="genericon genericon-collapse"></div> ', $already_loved = '', $echo = false ); | |
return $love_output; | |
} |
This file contains hidden or 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 | |
/* | |
* WP_Query happy dance | |
* | |
* this is a sample WP_Query the right way | |
*/ | |
$args = array ( | |
'post_type' => 'post', |
This file contains hidden or 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 | |
/* | |
* WP_Query doing_it_wrong | |
* | |
* i'm commenting this so you don't copy / paste this fail sauce | |
*/ | |
$original_query = $wp_query; // YUDOTHAT??? | |
$wp_query = null; // Oh, man |
This file contains hidden or 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_action( 'pre_new_day', 'krogs_alter_new_day' ); | |
/** | |
* krogs_alter_new_day function. | |
* | |
* @access public | |
* @param mixed $day |
This file contains hidden or 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 shopping cart thingy | |
function mystore_shopping_cart() { | |
global $woocommerce; | |
?> | |
<aside class="header-cart-info"> | |
<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="View your shopping carts" class="cart-contents"> |
This file contains hidden or 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_shortcode( 'infom-feature', 'infom_featured_items_shortcode' ); | |
function infom_featured_items_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'post_type' => 'page', | |
'id' => false, | |
'include_excerpt' => false, | |
'image_size' => false, | |
'posts_per_page' => 3, |