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_theme_enqueue_scripts() { | |
wp_dequeue_script( 'theme-script' ); | |
wp_enqueue_script( 'theme-script', THEME_URI . '/js/themify.custom.script.js', array('jquery'), false, true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_theme_enqueue_scripts', 12 ); |
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 media_custom_field_support() { | |
add_post_type_support( 'attachment', 'custom-fields' ); | |
} | |
add_action( 'init', 'media_custom_field_support' ); | |
function do_attachment_redirect() { | |
if( is_attachment() && $redirect = get_post_meta( $GLOBALS['post']->ID, 'redirect', true ) ) { | |
wp_redirect( $redirect ); |
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 product_lightbox_full_text() { | |
if( themify_theme_is_product_lightbox() ) { | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); | |
add_action( 'woocommerce_single_product_summary', 'the_content', 20 ); | |
} | |
} | |
add_action( 'init', 'product_lightbox_full_text' ); |
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_builder_frontend_display_setup() { | |
global $ThemifyBuilder; | |
remove_filter( 'the_content', array( $ThemifyBuilder, 'builder_show_on_front' ), 11 ); | |
add_filter( 'the_content', 'custom_builder_frontend_display', 11 ); | |
} | |
add_action( 'template_redirect', 'custom_builder_frontend_display_setup' ); |
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_footer_scripts() { ?> | |
<script> | |
jQuery(window).load(function(){ jQuery(window).resize(); }); | |
</script> | |
<?php } | |
add_action( 'wp_footer', 'custom_footer_scripts', 99999 ); |
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 ); |
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
.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
.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
<?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' ); |