WordPress.org

Forums

WooCommerce - excelling eCommerce
[Resolved] Remove image title or alt in WooCommerce product page (2 posts)

  1. Wazomba
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/plugins/woocommerce/

  2. polarvortex
    Member
    Posted 1 year ago #

    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;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic