1. Home
  2. Docs
  3. How to
  4. Combine Salesforce queries and filters with ACF – Advanced Custom Fields

Combine Salesforce queries and filters with ACF – Advanced Custom Fields

Advanced Custom Fields is a popular plugin that allows you add custom fields to WordPress posts, pages and more.

You can easily combine Sawfish plugin shortcode with ACF fields that are on a page. Let’s say you have a list of pages with specific fields added with ACF. You can add shortcode to retrieve the correct record from Salesforce based on the ACF field on that page.

All you need to know is the name of the field and you’re set! In the Add New Layout page from the Sawfish plugin, select the object you’d like to display.

In the filters option mention the ACF variable in this format:

$ACF_fieldname

eg:

Id = '$ACF_id'

When the Sawfish shortcode runs on the page it will replace the variable with the ACF value!

Was this article helpful to you? Yes No