Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8010

    Hello!

    Thank you! theme amazing!

    Hope “Alt” value, “Title” value by default is the “Product Name”, the general approach is to Set featured image in turn enter the “Title”, “Alternate Text”, but more so to modify the number of products will be very time consuming! http://www.diigo.com/item/image/24k6s/va89

    Want to change the theme source code to automatically make Alt value, title default value is “Product Name”, but not equal to “image File name”. For example: View the product name is “Simple Downloadable Product” source code: class = “attachment-shop_catalog wp-post-image” alt = “Gnilenkov_Aleksey_9” title = “Gnilenkov_Aleksey_9” />, to the effect automatically: class = “attachment-shop_catalog wp-post-image “alt =” Simple Downloadable Product “title =” Simple Downloadable Product ”/>.

    Look forward to pointing how to modify!

    First thank you!

    #60009

    Hey,

    this is a quite complex modification so I can only point you into the right direction. The image generation function can be found in abundanceframeworkphpfunction-set-avia-frontend.php – search for following function:

    function avia_image_by_id

    Basically you need to replace:

    $image_description = $attachment->post_excerpt == "" ? $attachment->post_content : $attachment->post_excerpt;
    $image_description = trim(strip_tags($image_description));
    $image_title = trim(strip_tags($attachment->post_title));

    with custom code which checks for products sites and fetches the right titles then.

    #60010

    Dude, Hey

    Thank you for your help!

    Here is my modified code, update function-set-avia-frontend.php, but the page does not change, because not too familiar with, I did not succeed to achieve.

    Because the number of products are many, will need to modify successfully, please help! :)

    Look forward to your reply!

    Thank you!

    $image_description = $attachment->post_excerpt == "" ? $attachment->post_content : $attachment->post_excerpt;
    $image_description = trim(strip_tags($image_description));
    $image_title = trim(strip_tags($attachment->post_title));
    /* return "<img src='".$image_src[0]."' title='".$image_title."' alt='".$image_description."' />";
    */ return "<img src='".$image_src[0]."' title='".$post_title."' alt='".$post_title."' />";

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Automatically so that Alt value, title default value is "Product Name"’ is closed to new replies.