Creating an archive page or simple template to list all values of a custom field of specific post type listing

I have a custom post type named ‘lawyer’ and it contains various custom fields. two of the custom fields are ‘state’ and ‘city’. i want to create a archive page or simple page(anyone will do) which can list all the values of city for specific state. for example i have 10 listings. 5 of which have custom field ‘state’ value as “albama” now i want list of the values ‘city’ of all those five listings which has state as “albama” but i also want that reduntant city doesnt not showup. i.e. if 3 of cities are “florence” then they only showup once.

Read more here:: Creating an archive page or simple template to list all values of a custom field of specific post type listing

Leave a Reply

Your email address will not be published. Required fields are marked *