Home › Forums › General Issues › Want Page ID in post_id Field › Reply To: Want Page ID in post_id Field
I think you’re making things a little more confusing than they are. Lets try simplifying the logic a bit.
Post a screenshot of the actual custom fields inside the field group, please. That way we can get the correct field names.
Start off by checking with a simple conditional if the current page_id is equal to your field.
for example:
<?php $field = get_field('your_field_name') ?>
<?php if(get_the_ID() == $field): ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.