Need help making custom field query (category custom field)
-
Just started with php and wordpress so any help is welcome.
Here is my setup. I have categories made of cities: paris, london etc. I have also custom field called “Location”. This is because I list restaurants I like. The location custom field is the name of the restaurant in the city. So I make a new post about restaurant X, select the Paris category and add a custom field Location of the name of the Restaurant.
So basically I have for that example
Category=Paris
custom-field”location”=BaconParadiseNow I would like to have a page/post where I could put a custom php query that would basically list ALL the “Locations” in that city. Something like
Select all the PARIS posts that have a LOCATION field and list them one by one on a single page but do not allow duplicates. Could someone be kind enough to help me write a query that would do that? Thank you so much in advance I am pulling my hair trying to make it work.
It should look like:
Paris Restaurants
– restaurant 1
– restaurant 2
etc… thanks in advance
- The topic ‘Need help making custom field query (category custom field)’ is closed to new replies.