I currently have an array of post ID's stored as $recenty_viewed that looks like this:

Array ( [0] => 3164 [1] => 3165 [2] => 3168 [3] => 3176 )

I'd like to display each post thumbnail and title using the ID's above, but I can't seem to figure out how to get the data from each post. Any idea?


Get post thumbnail by id = get_the_post_thumbnail($id);

Get the title by id = get_the_title($id);

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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