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 highlight_current_post( $classes ) { | |
global $post, $wp_query; | |
if( $post->ID == $wp_query->post->ID ) { | |
$classes[] = 'current-post'; | |
} | |
return $classes; |
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 custom_product_category_layout( $class ) { | |
if( themify_is_function('is_product_category') ) { | |
$class = 'sidebar1'; | |
} | |
return $class; | |
} | |
add_filter( 'themify_default_layout', 'custom_product_category_layout' ); |
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
@media (min-width: 480px) and (max-width: 959px) { | |
.col4-1 { | |
width: 46.8%; | |
} | |
.col4-1:nth-child(2n+1) { | |
margin-left: 0; | |
} | |
} |
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 gallery_shortcode_defaults( $out, $pairs, $atts ) { | |
$out['link'] = 'none'; | |
return $out; | |
} | |
add_filter( 'shortcode_atts_gallery', 'gallery_shortcode_defaults', 10, 3 ); |
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
.page-id-69 #header hgroup { | |
display: none; | |
} | |
.page-id-69 #headerwrap { | |
height: 0; | |
} | |
.page-id-69 #nav-bar { | |
top: 0; | |
bottom: auto; | |
} |
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 custom_attachment_size( $content ) { | |
if( is_attachment() ) { | |
global $post; | |
$content = wp_get_attachment_image( $post->ID, 'large' ); | |
} | |
return $content; | |
} | |
add_filter( 'the_content', 'custom_attachment_size' ); |
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
.module-menu.clean ul.nav, | |
.module-menu.clean ul.nav li, | |
.module-menu.clean li a, | |
.module-menu.clean li:hover, | |
.module-menu.clean li:active { | |
background: none; | |
border: none; | |
box-shadow: none; | |
} |
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
.col4-1, .col4-2, .col4-3, .col3-1, .col3-2, .col2-1 { | |
margin-left: 1.5%; | |
} | |
.col4-1 { | |
width: 23.8%; | |
} | |
.col3-1 { | |
width: 32.3%; | |
} | |
.col4-2, .col2-1 { |
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 putStickyOnTop( $posts ) { | |
global $wp_query; | |
if( $wp_query->is_category() ){ | |
$sticky_posts = get_option('sticky_posts'); | |
$num_posts = count( $posts ); | |
$sticky_offset = 0; | |
//loop over posts and relocate stickies to the front |
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 custom_product_sale_flash( $output, $post, $product ) { | |
$percent = ( ( $product->regular_price - $product->get_price() ) / $product->regular_price ) * 100; | |
return '<span class="onsale">' . __( 'Save:', 'themify' ) . round( $percent ) . '% </span>'; | |
} | |
add_filter( 'woocommerce_sale_flash', 'custom_product_sale_flash', 11, 3 ); |