Home › Forums › Front-end Issues › Query to display all posts with ACF relationship value › Reply To: Query to display all posts with ACF relationship value
Hi Jonathan,
I believe the code you provided above is the code to be put in archives.php right? I can’t get it to work unless the “View all” link from the company-single.php works, which doesnt:
<?php
$company_ID = $post->ID; //get the id of the current company
$archive = get_post_type_archive_link('post').'?company='.$company_ID;
?>
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.