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
| add_action( 'pre_get_posts', 'lit_offset_category_filter' ); | |
| function lit_offset_category_filter($query) { | |
| if ( ! is_admin() && $query->is_main_query() ) { // Apply to main WP query | |
| if( $query->is_category()) { // Only on category pages | |
| $offset = '3'; // Number of posts to offset | |
| $query->set( 'offset', $offset ); |
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 $post; | |
| $taxonomy = 'study_series'; | |
| $taxonomy_field = 'series_subtitle'; | |
| $terms = wp_get_post_terms($post->ID, $taxonomy, array('fields' => 'ids')); | |
| if ($terms) { | |
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
| (function($) { | |
| $('#%%ELEMENT_ID%%').children('.oxy-repeater-pages-wrap:only-child' ).text( "No Posts Foud" ); | |
| })( jQuery ); |
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
| add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) { | |
| return array( | |
| 'width' => 200, | |
| 'height' => 200, | |
| 'crop' => 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
| // Remove zoom and slider from single product | |
| add_action("after_setup_theme", "lit_remove_woo_theme_support"); | |
| function lit_remove_woo_theme_support() { | |
| remove_theme_support( 'wc-product-gallery-zoom' ); | |
| remove_theme_support( 'wc-product-gallery-slider' ); | |
| } | |
| // Remove product thumbnails | |
| remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 ); |
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
| .single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper { | |
| position: relative; | |
| } | |
| .single-product .secondary-image { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| opacity: 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
| jQuery(document).ready(function($){ | |
| console.log('document'); | |
| }); | |
| jQuery(window).load(function($){ | |
| console.log('window'); | |
| }); | |
| (function ($) { | |
| console.log('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
| function sp_titles_template_variables_array($array) { | |
| $array[] = '%%oxygen%%'; | |
| return $array; | |
| } | |
| add_filter('seopress_titles_template_variables_array', 'sp_titles_template_variables_array'); | |
| function sp_titles_template_replace_array($array) { | |
| if (class_exists('OxygenElement')) { | |
| $array[] = substr(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_meta(get_the_ID(), 'ct_builder_shortcodes', true), true))), 0, 160); | |
| } |
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_get_posts','remove_current_post'); | |
| function remove_current_post($query) { | |
| $current_post = get_the_ID(); | |
| $query->set('post__not_in', array($current_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
| jQuery('.oxy-off-canvas .menu-item a[href*=\\#]').on('click', function (event) { | |
| if(this.pathname === window.location.pathname){ | |
| jQuery('body').removeClass('off-canvas-toggled'); | |
| jQuery('.oxy-off-canvas').removeClass('oxy-off-canvas-toggled'); | |
| jQuery(jQuery('.offcanvas-inner').data('trigger-selector')).find('.hamburger').removeClass('is-active'); | |
| } | |
| }); |