KARL: I am trying to get the image from associated category. I am also trying to do it all via IDs. I have made an acf input field called category_icon and attached it to the taxonomy Property Features. I have managed to get as far as getting the associated category ID but can't get it to display the image.
Note from Karl: This fetches the first category image, on line 58 all terms are fetched, on line 67 the first one is chosen.
To fetch them all. Loop $customtaxonomy e.g
foreach($customtaxonomy as $term) {
if($image_id = get_field('category_icon', 'property-features_'.$term->term_id)) {
echo wp_get_attachment_image($image_id);
}
}
This should echo the id of the category it is in

225
This should echo the id of the image in that category
732
Relational Village
Relational Village's Email
Notice: Array to string conversion in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line
96
Notice: Array to string conversion in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line
122
Operator
Notice: Array to string conversion in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line
96
Notice: Array to string conversion in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line
122
Name
Test Property Four
Featured Image
Gallery
Price
£400,000
Featured Or Not
Is Not Featured
Property Features
Equity Share Available
Type
Maisonette
Sale Status
Sold
Bedrooms
Notice: Trying to get property 'name' of non-object in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/themes/boilerplate/cpts/properties/content-single-properties.php on line
802
Notice: Trying to get property 'name' of non-object in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/themes/boilerplate/cpts/properties/content-single-properties.php on line
802
,
Bathrooms
Notice: Trying to get property 'name' of non-object in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/themes/boilerplate/cpts/properties/content-single-properties.php on line
812
Notice: Trying to get property 'name' of non-object in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/themes/boilerplate/cpts/properties/content-single-properties.php on line
812
,
Description
Desc. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Spec
Spec. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Type
Spec. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Fees
Fees. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Attach PDF of Property Details
Other Properties in the same village
Village Features
KARL: Here I am trying check if the relational village is in the pets-welcome category of the retirement-village-features taxonomy. if it is I want it then to display the content. Below is the code that i have used to get the relational vilages id, and the if code i have used on the village content single to display the custom html. However I do not know how to make a query that asks IF $villageid is in this cat do X. Can you make it so the html is displayed if the relational village is in that cat.
Google Map of Related Village
Address
Notice: Array to string conversion in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line
96
Notice: Array to string conversion in
/home/325684.cloudwaysapps.com/qgzenkvkav/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line
122
Property Content
Duis at tellus at urna condimentum mattis pellentesque. Facilisis volutpat est velit egestas dui id ornare arcu odio. Eget mi proin sed libero enim. Mattis vulputate enim nulla aliquet. Urna porttitor rhoncus dolor purus non enim praesent elementum. Magna eget est lorem ipsum dolor sit amet consectetur adipiscing.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet,
- consectetur adipiscing elit,
- sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
- nisi ut aliquip ex ea commodo consequat.
- Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
- Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.