0

I created a picture for each post. It takes inputs at the post creat/edit step, then, calculates in a Class and generates the picture. The inputs are saved into the post meta. Now I need to display the picture after publish the post.

From the editing page, I can see the Class works perfectly and generates the right picture. I think, when displaying the post, the first step is to require the inputs that saved in post meta, but each post has a picture, how the class work through them. So, my guess is to make a loop?

1 Answer 1

1

You don't need separate loop to access post meta. You can use get_the_ID() in main loop to retrieve ID of current post and then use it in get_post_meta() to retrieve your data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.