Created
August 31, 2018 18:19
-
-
Save generatepress/53add6a3115a586e06004a6d453cf8b6 to your computer and use it in GitHub Desktop.
Code causing conflict with Beaver Themer
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( 'woocommerce_before_shop_loop', 'generatepress_wc_before_shop_loop' ); | |
/** | |
* Add opening element inside shop page. | |
* | |
* @since 1.3 | |
*/ | |
function generatepress_wc_before_shop_loop() { | |
$classes = apply_filters( 'generate_woocommerce_container_classes', array( | |
'wc-columns-' . generatepress_wc_get_setting( 'columns' ), | |
//'wc-tablet-columns-' . generatepress_wc_get_setting( 'tablet_columns' ), | |
'wc-mobile-columns-' . generatepress_wc_get_setting( 'mobile_columns' ), | |
) ); | |
$classes = array_map('esc_attr', $classes); | |
echo '<div class="' . join( ' ', $classes ) . '">'; | |
} | |
add_action( 'woocommerce_after_shop_loop', 'generatepress_wc_after_shop_loop' ); | |
/** | |
* Add closing element inside shop page. | |
* | |
* @since 1.3 | |
*/ | |
function generatepress_wc_after_shop_loop() { | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Tom! Thanks for the details. It looks like we need to adjust where we're firing that action in Themer as the opening div is being closed by our markup here... https://cl.ly/94b721eaffc2
I'll get a pull request going for this.