Request/Improvement: Add button to gridlist-buttonwrap div
-
For the storefront theme it might be ‘nicer’ to add the button inside the div gridlist-buttonwrap instead of outside/afterwards.
Benefits in my plain storefront theme is that the favorite button is easier to style. Especially keeping in mind the [view cart] button which appears after adding the product to cart.
For now I have added the following code to add the button inside the div. I would like to hear your thoughts about this.
file: www-functions.php
line: 66
code:add_filter( 'gridlist_button_wrap_end', 'jvm_filter_gridlist_button_wrap_end', 10, 1 ); function jvm_filter_gridlist_button_wrap_end( $output ) { return jvm_woocommerce_add_to_wishlist().'</div>'; // this is the default output }
CSS:
.gridlist-buttonwrap { text-align:center; } .gridlist-buttonwrap a { display: inline-block; } .added_to_cart { float: right; margin-left: 0px; margin-right: 2em; /*not the very best solution but good for now*/ }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Request/Improvement: Add button to gridlist-buttonwrap div’ is closed to new replies.