Tagged: advanced layout builder, ALB, attributes, enfold, masonry, masonry grid, Shop Page, woocommerce
-
AuthorPosts
-
January 6, 2018 at 8:37 am #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,
LivEDIT: 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.
January 7, 2018 at 2:36 pm #894327Hey 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,
VictoriaJanuary 8, 2018 at 8:03 am #894621Hi 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,
LivJanuary 8, 2018 at 6:17 pm #894823Hi 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,
VictoriaJanuary 9, 2018 at 8:52 am #895147Hi 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)
Cheers,
Liv- This reply was modified 6 years, 10 months ago by Liv1207.
January 12, 2018 at 10:19 am #896483Hi,
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,
IsmaelJanuary 13, 2018 at 2:09 am #896764Hi 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,
LivJanuary 13, 2018 at 5:29 am #896833 -
AuthorPosts
- You must be logged in to reply to this topic.