I want to display the woocommerce product dimensions in the store page in the meta. Please see the screenshot to have an idea of what I need to do. Title and price are fine. But between them I want the dimensions.
So, if you want to override the meta outside of the shop and add there a meta tag, please grab the file at arteon > templates > shop > type > meta-outside.php
Place that file into your child theme, so in case of any update you won't lose a thing.
Here's my "meta outside" template lines where you want me to put the code. Without your code. It broke my site when I put the code after the last <?php endif; ?>.
Please help me with this.
I want to display the woocommerce product dimensions in the store page in the meta. Please see the screenshot to have an idea of what I need to do. Title and price are fine. But between them I want the dimensions.
Thanks
Hi Lecantin,
If you check the Arteon folder, every layout is separated well in the templates.
- https://prnt.sc/s8rh2k
So, if you want to override the meta outside of the shop and add there a meta tag, please grab the file at arteon > templates > shop > type > meta-outside.php
Place that file into your child theme, so in case of any update you won't lose a thing.
Go to the corresponding line and add the following php. https://prnt.sc/s8rive
- https://stackoverflow.com/questions/55108223/display-product-dimension-in-woocommerce-product-summary
Kind Regards
Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.
Hi,
Thanks for your time, but the code don't work.
Here's my "meta outside" template lines where you want me to put the code. Without your code. It broke my site when I put the code after the last <?php endif; ?>.
<div class="o-neuron-hover__body">
<div class="o-neuron-hover__body-meta">
<?php if ($neuron_posts_meta_title == 'yes') : ?>
<h5 class="o-neuron-hover__body-meta__title"><a href="<?php the_permalink() ?>">
<?php echo esc_attr($product->get_title()); ?></a></h5>
<?php endif; ?>
<?php if ($neuron_posts_meta_price == 'yes') : ?>
<h6 class="o-neuron-hover__body-meta__price"><?php wc_get_template_part('woocommerce/loop/price') ?></h6>
<?php
if (!$product->is_in_stock()) {
echo '<div class="a-woo-badge a-woo-badge--red-color">' . esc_html__('Out of Stock', 'arteon') . '</div>';
} elseif ($product->is_on_sale()) {
echo '<div class="a-woo-badge a-woo-badge--theme-color">' . esc_html__('Sale!', 'arteon') . '</div>';
}
?>
<?php endif; ?>
</div>
</div>
Hi Lecantin,
If you could provide me with your wp-admin or FTP access, it would be easier for me. Since, I could implement and see what was not working.
Kind Regards
Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.
Sure,
Here's your admin login info:
User: NeuronSupport
Pass: XAh%dd6pcfK2KsS%
Please be patient, the site is slow when you're logged in because of woocommerce.
thanks
Hi Lecantin,
I have added your code via the child theme, please check it again.
Kind Regards
Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.
Please revert the changes... ther'es something that have changed in my headers...REVERT.
send my the files instead...
thanks
There's a shit load of changes that you made... REVERT!
Hi Lecantin,
Those are the options in the customizer that are changed, please go to the Appearance > Themes and switch to Arteon instead of Arteon Child.
Kind Regards
Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.