I have managed to work it out – the function was leading to a lot of queries, so I rewrote it as follows:
$housePhotos = get_post_custom_values('house_photos');
$housePhotos = explode(';',$housePhotos[0]);
preg_match_all('`"([^"]*)"`', $housePhotos[1], $results);
$imageURL = wp_get_attachment_image_src( $results[1][0], 'house_search' );
if (!empty($results[1][0])) {
echo '<img src="' . $imageURL[0] .'" alt="" />';
}
Related Posts:
- Custom Taxonomy Images with Advanced Custom Fields
- Advanced custom fields – taxonomy terms images [closed]
- How to add images to taxonomies?
- Adding Category/Tag/Taxonomy Support to Images/Media
- Order get_terms using a Custom Field
- Get value in custom field with taxonomy [closed]
- Remove Category description textarea
- Displaying ACF image field [closed]
- Correct Way To Show Custom Taxonomy for Image Attachments on Template File
- Display an image instead of tag name?
- Operations with custom fields values in a loop
- ACF vs Taxonomies
- Specifying a size when displaying an image associated with a taxonomy through ACF
- How to display custom taxonomy images on index.php?
- Meta query for a custom taxonomy on attachment
- How to add contents of a custom field to a taxonomy term list?
- Taxonomies image
- Search Tool only refreshes Page without showing results
- Display value of custom field of custom taxonomy in single post?
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- WordPress implode & wp_insert_post question
- Display a colour of custom taxonomy on the page
- Can’t get taxonomy ID for each post on archive page
- Loop to display ONLY custom taxonomy parent information [closed]
- Using Advanced Custom Fields Relationship Field to select a taxonomy term
- Replace taxonomy term with an image in a custom loop
- query to use to link to taxonomy single page
- Featured Images for Tags?
- Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
- How can I get Taxonomy Images to work with ‘orderby’ argument?
- Why do my quick edits for custom taxonomies not show on the post frontend?
- Echo ACF taxonomy field within a foreach for another taxonomy
- new custom filed not showing in taxonomy
- Connect ACF field + custom taxonomy [closed]
- Adding Advanced Custom Fields to posts
- Query all images with certain tag in media library using visual portfolio plugin
- ACF Field, hide taxonomy title and image when no nothing selected in post
- ACF Custom field not showing in Timber Taxonomy page
- WordPress search form and search result through ACF field in custom taxonomy
- How to show selected check box vendors on front end home page?
- Resize $term attachment using url
- Creating a list with multiple categoreis and options
- Add image to taxonomy and output to homepage
- Taxonomies, Adanced Custom Fields and Repeatable Fields
- Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode
- ACF Display Taxonomy Image Field
- Display posts from specific slug of the custom taxonomy in WordPress
- Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy
- get_the_term_list without links in 3.1
- get_term_children for immediate children only (not grandchildren)
- Custom taxonomies capabilities
- Can’t get a custom template taxonomy page to display
- Creating a non-removable taxonomy term
- Can I turn off write-in tags/taxonomies?
- Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request
- Displaying the Name of the Queried Taxonomy Term on a Term Archive Page?
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- get taxonomy terms for parent and child
- On Taxonomy Template page, want to add Post_Type
- Help building array hierarchically with taxonomies (to get posts)
- Removing the base “Author” or changing it to something else. is it possible?
- Next and Previous links on a single taxonomy page only link to same term
- Why does WP rename similar “term name”-slugs in separate taxonomies?
- Get custom taxonomy description with paragraph tags
- Change permalink of post if it belongs to custom taxonomy
- Get pages only with a specific taxonomy
- Share taxonomy between user and posts?
- How do I Use Multiple Loops with WP_Query?
- $wpdb query a post type within a specific taxonomy term while ordering posts by custom meta value?
- How to obtain the link/URL to the feed of a custom taxonomy?
- get_term_children doesn’t return an array of children terms
- Term count by user
- Querying two taxonomies
- Custom taxonomy query is empty. 0 = 1 in SQL
- How do you reorder the custom taxonomies on the right side of a custom post edit page?
- Query posts by taxonomy with current term
- What is the most efficient way of implementing a notification system? [closed]
- Get posts by Taxonomy without terms
- How to add images to taxonomy terms? [duplicate]
- Echo custom taxonomy slug
- Upload non-featured image to image field
- Correctly order the hierarchy of custom taxonomy when displaying terms
- How best to store data (URLs and IDs) extracted from posts and pages using custom taxonomies
- How to create a custom template for custom taxonomy wp-tag-cloud?
- Need to display custom taxonomy on single page – not working
- Only display latest custom taxonomy post
- How to group non-hierarchical tags?
- Custom front-end form for adding post – Category problem
- Show recent posts from a custom taxonomy in wordpress
- Fill New Taxonomies
- How to update an image attachment’s alt text from a custom field when saving a post?
- How do I show the parent term on a custom taxonomy template (not the ID)?
- Display taxonomies for custom post type
- WordPress and Advanced Custom Fields and Flickity
- custom taxonomy don’t return a value
- How to query posts by meta keys AND under specific category?
- Where to put a migration script to switch post information?
- Get post terms with hierarchical relationships
- Error in Custom Taxonomy UI
- ACF Taxonomy Object term Null [closed]