Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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