Support » Plugin: WooCommerce » [Resolved] Remove image title or alt in WooCommerce product page

  • My products image titles/alt are really ugly and I wanted to hide them both from the single product page and from the prettyphoto lightbox.

    I searched many places to find how to remove them and finally found a simple trick I’d like to share.

    To remove from single product page (not displaying on mouseover)
    If not, create a child theme for woocommerce and edit the 2 files product-image.php and product-thumbnails.php.
    In each file, find the line starting with “$image_title…” (lines 21 and 41 for me) and comment them out with double slash “//”. That’s all here.

    To remove image titles from PrettyPhoto lightbox :
    – In your WP plugins foler, edit “/plugins/woocommerce/assets/css/prettyPhoto.css”.

    – Find “div.pp_woocommerce div.ppt{color:black}” and replace by “div.pp_woocommerce div.ppt{color:black;display:none!important;}”. This will remove image top title in lightbox.

    – Then, find “div.pp_woocommerce .pp_nav,div.pp_woocommerce .pp_description…” and replace it with “div.pp_woocommerce .pp_nav,div.pp_woocommerce .pp_description{font-size:11px;color:#FFFFFF;}” (It simply makes text color white on white background and keeps nav buttons. You can trick it more by playing with “.pp_nav” and “display:none”.

    Hope this will help.

Viewing 1 replies (of 1 total)
  • Based on what Wazomba’s suggestion:

    // hide upper title
    .pp_woocommerce .ppt {
    display: none !important;

    // hide lower title
    .pp_woocommerce .pp_description {
    display: none !important;

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Remove image title or alt in WooCommerce product page’ is closed to new replies.