HomePage › Forums › Themeforest › Organey – Organic Food WooCommerce WordPress Theme › HTML changes to some of the elements
- This topic has 9 replies, 2 voices, and was last updated 2 years, 2 months ago by Supporter.
-
AuthorPosts
-
July 4, 2022 at 8:52 pm #6728MatijaSupport Expired
Hello,
would you be so kind and tell us how to change the HTML of some of the elements, for example the HTML of mini-cart?
We’ve tried changing the following files (with no success):
– wp-content/plugins/woocommerce/templates/cart/mini-cart.php
– wp-content/themes/organey/woocommerce/cart/mini-cart.php
– wp-content/themes/organey-child/woocommerce/cart/mini-cart.phpHow could we add some wrappers to the HTML?
Thank you and kind regards.
Matija
July 4, 2022 at 11:32 pm #6730Hi,
Please override the following function in the child-theme, then add the wrappers or html you want:
function organey_header_cart_side() { if (organey_is_woocommerce_activated()) { ?> <div class="site-header-cart-side side-wrap"> <a href="#" class="close-cart-side close-side"></a> <div class="cart-side-heading side-heading"> <span class="cart-side-title side-title"><?php echo esc_html__('Shopping cart', 'organey'); ?></span> </div> <?php the_widget('WC_Widget_Cart', 'title='); ?> </div> <div class="cart-side-overlay side-overlay"></div> <?php } }
For the content cart part, you need to override the mini-cart file in the child-theme and edit the html markup as you did above.
July 11, 2022 at 5:57 pm #6773MatijaSupport ExpiredThank you for your answer!
Matija
July 12, 2022 at 12:33 am #6789Ok, let me know if you need to help.
September 13, 2022 at 7:42 pm #7351MatijaSupport ExpiredHello,
thank you for your instructions once again.
We’ve tried this approach but it doesn’t work for us. The generated HTML stays unchanged.
Could you please specify exactly which files need to be modified? If it would be easier, I can also let you know cPanel/FTP access details.
Thank you,
Matija
September 13, 2022 at 11:57 pm #7354Ok, please send the Admin web account for me, I will check and try to help you.
September 14, 2022 at 9:47 pm #7371MatijaSupport ExpiredThis reply has been marked as private.September 14, 2022 at 11:43 pm #7381Hi,
#1/ Ok, I’ve overridden it in the child-theme for you, and you can change it to a div tag.
However this may break the layout, lose the previous css customizations of the theme, or the cart related js may not work.
We won’t help you fix this problem if you still want to change the html markup#2/ I have also included the min-cart file title in the child-theme so that you can easily edit it. However, this editing will affect the previous css and js customizations of the theme.
September 15, 2022 at 8:36 pm #7385MatijaSupport ExpiredThank you, we really appreciate your effort.
September 15, 2022 at 11:44 pm #7392Ok, let me know if you need to help.
-
AuthorPosts
You must be logged in to reply to this topic.