• A very elegant plugin, well-made, integrates seamlessly, fast. Flawless! I’d like to support/donate to the development and maintenance, please let me know how to.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi phantasmix,

    You can contribute by multiple ways:

    – Donate through PayPal (hola[at-here]albertodevera.es)
    – Contribute on GitHub
    Translate the plugin

    Thanks in advance!

    Hi, first let me thank you for this great plugin.
    i’d like to use this code to add automatically product name and product brand to the alt text of images. `add_filter(‘wp_get_attachment_image_attributes’, ‘change_attachement_image_attributes’, 20, 2);

    function change_attachement_image_attributes( $attr, $attachment ){
    // Get post parent
    $parent = get_post_field( ‘post_parent’, $attachment);

    // Get post type to check if it’s product
    $type = get_post_field( ‘post_type’, $parent);
    if( $type != ‘product’ ){
    return $attr;
    }

    /// Get title
    $title = get_post_field( ‘post_title’, $parent);

    $attr[‘alt’] = $title;
    $attr[‘title’] = $title;

    return $attr;
    }`
    is there a way to get the product brand ?
    Thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Truly Per-fect’ is closed to new replies.