My goal is that when we click on the link of a city we are redirected to a page which displays a message with the number of pharmacies and parapharamcies in the city. I tried this but it doesn’t work at all: <?php // Check if the city is specified by Geodirectory if (isset($_GET[‘gd_place_city’])) { // Get the city name from Geodirectory settings $city = $_GET[‘gd_place_city’]; // Get the number of pharmacies in the specified city $pharmacies = get_posts(array( ‘meta_query’ => array( array( ‘key’ => ‘gd_place_city’, ‘value’ => $city ) ), ‘post_type’ => ‘geodir_customfields’, ‘meta_key’ => ‘category’, ‘meta_value’ => ‘pharmacy’, // Use of the singular ‘posts_per_page’ => -1, // Get all results ‘fields’ => ‘ids’ // Only retrieve the article IDs )); // Retrieve the number of drugstores in the specified city $parapharmacies = get_posts(array( ‘meta_query’ => array( array( ‘key’ => ‘gd_place_city’, ‘value’ => $city ) ), ‘post_type’ => ‘geodir_customfields’, ‘meta_key’ => ‘category’, ‘meta_value’ => ‘parapharmacy’, // Use of the singular ‘posts_per_page’ => -1, // Get all results ‘fields’ => ‘ids’ // Only retrieve the article IDs )); // Count the number of results $pharmacy_number = count($pharmacies); $parapharmacy_number = count($parapharmacies); // Show text with bold numbers and with a skipped line echo “<strong>We found $number_pharmacy pharmacy and $number_parapharmacy drugstore in the city of $city.</strong><br>”; } else { // Show an error message if the city is not specified by Geodirectory echo “Please specify a city.”; } ?> so I’m looking for how to do it, thank you in advance for your answers. Can you translate this into English for me?
The page I need help with: [log in to see the link]