ACF – A Simple & Easy Way To Get Values From Another Post

In this post, I’m going to teach you how to use the ACF plugin to create an easy way to get values from another post on your site.

So if you need a quick way to add values to any WordPress post or page, then this post is for you.

ACF is an easy-to-use plugin that lets you add custom fields to any post or page.

These fields can be used to store information about posts, pages, comments, users, taxonomies, categories, tags, attachments, and other types of data.

The plugin works seamlessly with other plugins.

With ACF, you can quickly generate dynamic forms, sliders, galleries, maps, and more.

image.png

1. Create A New Post Object Field

image.png

2. Add The Post Type

image.png

3. Filter Category (Optional)

image.png

4. Return Post ID

image.png

Code Snippet

$page_link_field = get_field('your_field_id');

$custom_page = $page_link;

if ($acf_snippet = get_field('acf_snippet', $custom_page)) : ?>
	<?php echo ($acf_snippet); ?>
<?php endif; ?>