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
- ACF – How to get custom taxonomy term image field
- querying posts by custom taxonomy terms right from a querystring based URL
- How to change url for taxonomy pages?
- How to Modify Default Text in a Custom Taxonomy Admin Panel?
- Multiple Custom Taxonomy Dropdowns Lists
- How to show post list based on taxonomy term?
- WordPress autocomplete search with taxonomies
- Display empty custom taxonomies differently than with one with posts
- Double slash in the_terms URL
- Using custom taxonomy when registering a new custom post type
- How to call a custom taxonomy term name inside a function?
- Get custom taxonomy name (not the term) in custom post
- remove term from custom taxonomy list
- Display taxonomy with a maximum number of letters
- Display Child Categories of Current Post ID
- Taxonomies specific to Page attribute template
- Saving custom taxonomies to post as checkbox on frontend
- Custom taxonomies registered via plugin stop existing after function finishes running
- How can I show links for custom posts group by taxonomy current term and sub-term?
- Show custom taxaomy as a product meta
- Keeping session instance of random display results over pagination breaks
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- How can I rewrite the URL of my custom taxonomy to include the year?
- Infinite Scroll appending Next Product Category Term pages
- Query Product categories what have a custom field
- Listing Cities A custom taxonmy by selection order
- ACF – Can’t get custom post type by taxonomy
- Template taxonomy-{taxonomy}.php doesn’t show my posts
- Count tags for current post and save into custom meta field (and update it on post edit)
- Problem registering custom taxonomy
- Limit Tag Links in Post Content
- Passing taxonomy id of taxonomy clicked on one page to another page
- Custom Taxonomy Not Being Recognized by is_tax()
- How to truncate the description in the admin panel for a custom taxonomy
- Custom button on custom taxonomy listing page
- customize taxonomy Page
- Why is it defaulting to “uncategorized” even after I select a custom taxonomy
- Remove taxonomy menu without removing the metabox?
- Custom taxonomy list in Worpdress
- Get one custom taxonomy category
- How can I show custom field according to taxonomy?
- Creating a page for custom taxonomy archive
- WordPress Taxonomy Menu
- Insert code on specific taxonomy archives
- get_term_children specific no id
- Advanced Custom Fields Image Crop
- custom texonomy category child category list with parent head
- How do I create a term for every value of a post meta?
- Custom taxonomy archive empty
- Taxonomy Child Not Updating Unless I Click Update Twice
- How to show to show post list under the specific category name using jetengine query?
- How to enforce a requirement for custom taxonomy