Hi all,
I want to get a custom listing attribute in functions.php. I am pretty sure that I have an attribute called “country”, but this code does not show anything in my listing block.
Any ideas?
Please send more details that may help to detect or reproduce this issue (e.g., screenshots, the type of the Country attribute (e.g., text, select, checkboxes, etc.) or the error message you get).
The attribute has several options like “Germany”, “Austria”, “United Kingdom”, etc. Not all listings have a country since I am just working with dummy data, but some certainly do.
I know that this could be done via Attribute >> Areas, but my point is to insert it manually (programatically) because it gives me more formatting options. There is no error message, but the code I shared leaves the $country variable empty (it shows only the icon but no country value).