Tell us what you are trying to do?
I inherited a site which was built 7+ years ago by a developer who is no longer available. This site uses a custom WP theme and custom post types that were likely created with Advance Custom Fields (or something similar). I am trying to recreate the presentation of this data using Views.
While Views can call up the ID from a image which was placed through this custom field, I am wondering if it will be possible to configure Views to actually show the image from the ID.
Is there any documentation that you are following?
I wish!
Is there a similar example that we can see?
For reference, this is a simple code snippet from the Views template:
[wpv-post-link]<br />
[wpv-post-field name='person_profile_picture'] <br />
Category = [wpv-post-field name="person_category"] <br />
And this is the basic output. It works, but as you can see I get an ID vs usable image information:
Jürgen Babirad
12058
Category = faculty
Tiago Barreira
12367
Category = faculty
The OLD site template used this code to render the image:
<?php
$post_thumbnail_id = get_field('person_profile_picture');
if($post_thumbnail_id) {
$the_image = wp_get_attachment_image($post_thumbnail_id, 'people_thumbnail', FALSE, array('class' => 'photo'));
}
if($the_image != NULL)
echo $the_image;
?>
Is there anyway to leverage the Views PHP function here?
What is the link to your site?
It is behind a firewall 🙁
Many thanks!