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.
1. Create A New Post Object Field
2. Add The Post Type
3. Filter Category (Optional)
4. Return Post ID
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; ?>