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
| .woopack-product-grid { | |
| overflow: visible; | |
| } | |
| .woopack-product-image { | |
| position: relative; | |
| padding: 0; | |
| border: 0; | |
| } | |
| .woopack-product-image a { | |
| display: block; |
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( 'pp_cg_before_posts', function( $settings, $query ) { | |
| if ( 'no' == $settings->post_grid_filters_display || 'none' == $settings->post_grid_filters ) { | |
| return; | |
| } | |
| add_filter( 'pp_cg_filter_terms', function( $terms, $module_settings ) use ( $query ) { | |
| $rendered_terms = array(); | |
| $posts = $query->get_posts(); | |
| foreach ( $posts as $single ) { |
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
| .pp-add-to-cart a.loading { | |
| opacity: 0.5; | |
| pointer-events: none; | |
| } | |
| .pp-add-to-cart a.added_to_cart { | |
| margin-left: 5px; | |
| } |
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 | |
| // Please copy the code below and paste it to your current theme's functions.php | |
| add_filter('pp_category_grid_query_args', function($args, $settings) { | |
| if ( is_tax() || is_category() || is_tag() ) { | |
| $current_object = get_queried_object(); | |
| $taxonomy = $current_object->taxonomy; | |
| // Unset or remove variables. |
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 sort by Title. | |
| add_filter( 'woocommerce_catalog_orderby', 'custom_sorting_options_wc', 99 ); | |
| add_filter( 'woocommerce_default_catalog_orderby_options', 'custom_sorting_options_wc', 99 ); | |
| function custom_sorting_options_wc( $order_by ) { | |
| $new_options = array( | |
| 'title' => __( 'Sort by Name: A to Z' ), | |
| 'title-desc' => __( 'Sort by Name: Z to A' ), | |
| ); | |
| $order_by = array_merge( $order_by, $new_options ); |
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
| .woopack-product-grid { | |
| overflow: visible; | |
| } | |
| .woopack-product-image { | |
| position: relative; | |
| padding: 0; | |
| border: 0; | |
| } | |
| .woopack-product-image a { | |
| display: block; |
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_product_add_to_cart_text', function( $text, $product ) { | |
| if ( 'variable' === $product->get_type() ) { | |
| $text = __( 'Read More' ); | |
| } | |
| return $text; | |
| }, 11, 2 ); |
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_shortcode( 'custom_acf_gallery', function( $atts ) { | |
| $gallery_data = get_field( 'gallery' ); // change the field name accordingly. | |
| ob_start(); | |
| if ( ! empty( $gallery_data ) ) { | |
| ?> | |
| <div class="pp-post-gallery"> | |
| <?php | |
| foreach ( $gallery_data as $image_data ) { |
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( 'pp_cg_scroll_to_grid_on_filter', function( $should_scroll ) { | |
| if ( is_page( 4399 ) ) { // Please change the Page ID here. | |
| $should_scroll = false; | |
| } | |
| return $should_scroll; | |
| } ); |
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
| .pp-post { | |
| height: 100%; | |
| } | |
| .pp-post-body { | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: space-between; | |
| height: 100%; | |
| margin-top: 0; | |
| } |