Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #893995

    I’m using a custom ALB shop page using the Masonry Grid and I need to display an attribute (or two, if possible) just below the product name.

    I’ve been trying to figure this out for weeks and was about to give up, but I just found this thread and it’s given me hope.

    Can anyone please point me in the right direction? I feel like I’ve read every thread/post/google search result out there, and this is the only one that shows that displaying a product attribute on an ALB shop page is possible.

    Cheers,
    Liv

    EDIT: Sigh. I just inspected OPs site that’s linked halfway down the thread and realized that he’s not using a custom ALB shop page. I guess I assumed he was since he was posting here. Not giving up hope… any info or suggestions is greatly appreciated! Thanks!

    • This topic was modified 6 years, 10 months ago by Liv1207.
    #894327

    Hey Liv,

    You will need to modify the masonry files
    /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php
    /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_entries.php
    But to do the modifications you will need to copy the files to the child theme.
    This can get complex and if your php is not good enough you might want to hire a freelancer to do it for you.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #894621

    Hi Victoria,
    I’ve modified enfold shortcode files by copying them to the child theme before, so that won’t be a problem. Do you mind specifying what I need to add to them and where in order to get certain attributes to show?

    Thanks for your help,
    Liv

    #894823

    Hi Liv,

    I don’t know which attributes you want to show.
    Could you please attach a mockup of what you’re trying to achieve?

    Best regards,
    Victoria

    #895147

    Hi Victoria,

    I’m trying to get a custom product attribute to show below the product name on the shop page (using the masonry element). I feel like I’ve gotten really close using pa_vendor loops, but nothing seems to do the trick. I just need to figure out what to add to the av-helper-masonry & masonry-entries files.

    Here are some screenshots and a quick mockup of the vendor attribute I’m trying to add (orange text)
    1
    2
    3
    4

    Cheers,
    Liv

    • This reply was modified 6 years, 10 months ago by Liv1207.
    #896483

    Hi,

    You can try the following function.

    global $product;
    $vendor = $product->get_attribute( 'vendor' );

    Based on: https://stackoverflow.com/questions/13374883/woocommerce-getting-custom-attributes

    Best regards,
    Ismael

    #896764

    Hi Ishmael,

    I’m trying to get it to show below the product names on the shop page using the Masonry element. Where would I enter this in the av-helper-masonry.php and/or masonry_entries.php files?

    Thanks,
    Liv

    #896833

    Hi,

    In the “av-helper-masonry.php” file, go to line 327.

    $items .=	"<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
    

    Add the snippet after that line. The product attribute name may require adjustments.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.