Magento Advanced Custom Fields

Magento 2 - WordPress IntegrationAdvanced Custom Fields

Create and use complex custom fields types using ACF and ACF Pro and make use of them in Magento 2.

Secure CheckoutVersion
Requires either ACF or ACF Pro be installed in WordPress.
Compatible with Magento 2.
£69.99 Available for Download

Advanced Custom Fields Reviews

Have Your Say...

If you have used Advanced Custom Fields and want to share your opinion, you can leave a review below.

You can access custom fields using the getMetaValue() method of the Post model.

<?php $value = $post->getMetaValue('my_acf_field') ?>

The above code stores the custom field in $value so you would need to echo it out or do something with it to actually see the value.

You can use the same method on term objects.

<?php $value = $post->getMetaValue('my_acf_field') ?>
<?php echo $value ?>

Options Fields

Option FIelds in ACF are great because they allow you to create custom fields that aren't attached a post object and can be used around your site where ever you want.

Once you have created an options field, they are easy to access.

	# This example uses the Object Manager for simplicity
	# You can inject the ACF Data helper into a constructor instead if you wish
	$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

	# Get the ACF Helper
	$acfHelper = $objectManager->create('FishPig\WordPress_ACF\Helper\Data);
	# Echo out the ACF Options Field
	echo $acfHelper->getOptionsField('options_field_name');

Documentation & Support

Submit a Support Ticket

If none of the articles on the left answer your question, you can use the form below to submit a support ticket.

Want help quicker? Check out the Magento WordPress Integration Support Service.
  • Loading Submitting your support ticket.
Post your comment

FishPig Ltd