Support

Account

Home Forums Front-end Issues Post Object: Selection does not show up in Custom Post Type Reply To: Post Object: Selection does not show up in Custom Post Type

  • Hi @elliot,

    I tried inserting
    <?php global $post; echo $post->ID; ?>
    and it gives me 862. But the post-id of the company-post-type is 240 (am I correct to say the post ID is the number in this URL: ../adm/wp-admin/post.php?post=240&action=edit )

    If I am correct in the above 2 things, this means that ACF isnt loading the selected banners from the company’s post-id and instead some other post’s. I am a newbie at php, would be really grateful if you could let me know how I can modify my code in my banners.php (which is called in my single-company.php) which has the code that I pasted in my previous post.

    EDIT: I have tried including the banners.php template INSIDE my loop and it works! Is there a way to make it work outside the loop, if I do not wish to create a secondary loop?

    P/S. Thanks for helping me hone in on the root of the problem! xx