Hello. I need to make category archive with my posts and to open posts in popup as quick preview. What's the code to put inside popup? For now, clicking all posts my popup shows custom fields only from the first post.
Thanks for assistance, Anh Tran. But what if I need to retrieve metaboxes in a loop? Not from exact post but from the postroll? I've got a category displaying 19 posts in total. Some sort of a store. I want to click on every postblock in a roll and get quick view popup. What parameter do I have to put as $post_id?
If you're in a loop and called the function $query->the_post(), then you don't need to pass any variable. The current post ID (retrieved via get_the_ID()) is passed by default.
If that doesn't work, please post the code you use in the loop.
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Retrieve posts custom fields in a loop’ is closed to new replies.