I'm setting up a marketplace-style website for local furniture makers and vintage shops, using WordPress with WooCommerce and the WooCommerce Vendor Stores plugin. In order to create more complete vendor profiles, I'm using Advanced Custom Fields to add new fields to the vendor stores, which are taxonomies.
Here's what I've done so far:
- Installed ACF and created a field group and custom field.
The custom fields will need to be on my vendor pages, which are set up as taxonomies via the Vendor Stores plugin so I added this code to the template:
<?php the_field('vendor-style'); ?>
Nothing appeared when I uploaded the file, added some info to a vendor profile and saved.
I figured it was something with the taxonomy thing, so I then looked up some info about including terms, and tried this (vendor-store is the taxonomy term).
<?php the_field('vendor-style', 'vendor-store'); ?>
Nothing showed up, so I tried following this advice: ACF fields not showing on a wordpress custom taxonomy page and that didn't work.
When I turned on debugging, I got the following error message on my vendor page:
Notice: Trying to get property of non-object in /nas/wp/www/cluster-2626/foundlocal/wp-content/themes/hub/includes/integrations/woocommerce/template.php on line 124 class="archive tax-shop_vendor term-isabella-sparrow term-52 logged-in admin-bar no-customize-support woocommerce woocommerce-page woocommerce-demo-store ignitewoo_vendor_stores vendor_store isabella-sparrow chrome alt-style-default layout-left-content has-lightbox ">
The line that this error message is referring to is:
$single_layout = get_post_meta( $post->ID, '_layout', true );
Anyone have any suggestions? I'm trying to finish this today, and feel like I'm just spinning in circles at this point.