Disclaimer
I am a noob at any kind of coding, but have to build my own website.
Okay I have downloaded and set up my child theme of OceanWP and activated it.
Imported all the file into the child theme (not sure what I needed to edit).
I am trying to edit the WooCommerce products display page (main shop archive?) to stop it from showing the short description under each product but retain it in the single product page.
I have tried using CSS in the customizer. Have also tried copy and pasting filters into the functions.php
from other threads, but nothing changes.
Am I supposed to change this in the function.php
or the WooCommerce product owp-archive-product.php
?
When I edit my custom product page with Elementor Pro, it doesn’t display the short description until I load the page in a live preview and then everything is pushed out of line because some products don’t have short descriptions.
Not sure what to do or what I am doing wrong here.
Sorry if this post isn’t in the correct format I’m new here.
Appreciate any help to solve this issue.
Thank you.
2
Answers
The Easiest way would be just to leave the short description blank in the backend, however, You can remove the Short Description field from the WooCommerce admin area via PHP:
This question is old but someone else may stumble on this in search of a solution to the same problem. Please use this:
In the code snippet above, the
woocommerce_template_single_excerpt()
function outputs the product short description (excerpt). This function is invoked at the woocommerce single product’s page hookwoocommerce_single_product_summary
.The remove_action() function will remove the
woocommerce_template_single_excerpt()
function attached to the specified action hookwoocommerce_single_product_summary
on the singles product page.References: