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
| $(window).load(function() { | |
| $('.slides').on('setPosition', function () { | |
| $(this).find('.slick-slide').height('auto'); | |
| var slickTrack = $(this).find('.slick-track'); | |
| var slickTrackHeight = $(slickTrack).height(); | |
| $(this).find('.slick-slide').css('height', slickTrackHeight + 'px'); | |
| }); | |
| }) |
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
| /** | |
| * Changes the class on the custom logo in the header.php | |
| */ | |
| function helpwp_custom_logo_output( $html ) { | |
| $html = str_replace('custom-logo-link', 'navbar-brand', $html ); | |
| return $html; | |
| } | |
| add_filter('get_custom_logo', 'helpwp_custom_logo_output', 10); |
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
| /** | |
| * Remove hentry from post_class | |
| * This is important to not get schema errors | |
| */ | |
| function visceral_remove_hentry_class( $classes ) { | |
| $classes = array_diff( $classes, array( 'hentry' ) ); | |
| return $classes; | |
| } | |
| add_filter( 'post_class', 'visceral_remove_hentry_class' ); |
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 | |
| /* | |
| * ================================================================================================= | |
| * Below both hooks works for custom post types. | |
| * e.g. Suppose we have custom post-type name : Books | |
| * @ref https://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column | |
| * ================================================================================================= | |
| */ |
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 | |
| global $woocommerce; | |
| $currency = get_woocommerce_currency_symbol(); | |
| $price = get_post_meta( get_the_ID(), '_regular_price', true); | |
| $sale = get_post_meta( get_the_ID(), '_sale_price', true); | |
| ?> | |
| <?php if($sale) : ?> | |
| <p class="product-price-tickr"><del><?php echo $currency; echo $price; ?></del> <?php echo $currency; echo $sale; ?></p> | |
| <?php elseif($price) : ?> |
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
| /* | |
| * Polylang Language API functions tester - WordPress | |
| * Github: https://gist.github.com/icetee/fbbfef5534fead58611e | |
| * | |
| */ | |
| function ex_pll_the_languages($arg = '') { | |
| if ( function_exists('pll_the_languages') ) { | |
| return pll_the_languages($arg); | |
| } |
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( 'woocommerce_cart_loaded_from_session', function() { | |
| global $woocommerce; | |
| $products_in_cart = array(); | |
| foreach ( $woocommerce->cart->cart_contents as $key => $item ) { | |
| $products_in_cart[ $key ] = $item['data']->get_title(); | |
| } |
NewerOlder