{"id":57397,"date":"2023-05-22T17:22:55","date_gmt":"2023-05-22T11:52:55","guid":{"rendered":"https:\/\/2thenew.online\/blog\/?p=57397"},"modified":"2023-05-30T17:34:06","modified_gmt":"2023-05-30T12:04:06","slug":"how-to-create-custom-location-dropdown-block-on-your-drupal-site","status":"publish","type":"post","link":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/","title":{"rendered":"How to Create Custom Location Dropdown Block On Your Drupal Site"},"content":{"rendered":"<h3>Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms.<\/h3>\n<h4><em><strong>Steps:-<\/strong><\/em><\/h4>\n<h4>First of all, We have to go on over Drupal Site and Create the Vocabulary Name &#8216;Location&#8217;:<\/h4>\n<p><em>structure\/taxonomy\/Location<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57381\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/first-1.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/first-1.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/first-1-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/first-1-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/first-1-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<h4>Then Create Country as Parent Term And Region as Child Term accordingly :<\/h4>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57382\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/second-1-1.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-1-1.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-1-1-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-1-1-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-1-1-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57383\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/second-2-1.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-2-1.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-2-1-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-2-1-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/second-2-1-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<h4 style=\"text-align: left;\">Create a Custom Module For the Location Dropdown Block (We can also use any Existing Custom\u00a0 Module For Location Dropdown Block):<\/h4>\n<p><em>\u00a0Create Custom Block File (PHP file):<\/em><\/p>\n<p><em>src\/Plugin\/Block\/LocationDropdownBlock.php<\/em><\/p>\n<p style=\"text-align: center;\"><strong>Here is the Example Code of .PHP file<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57388\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code1-1-2.png\" alt=\"Blog image\" width=\"850\" height=\"360\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-1-2.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-1-2-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-1-2-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-1-2-624x264.png 624w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57389\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code1-2.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-2.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-2-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-2-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-2-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57390\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code1-3.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-3.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-3-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-3-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/code1-3-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Now we have to use any API to get the IP Address of the User:<\/h4>\n<p><em><strong>Free API to get the IP Address Of the User:<\/strong><\/em><\/p>\n<p>1. https:\/\/ipapi.co\/json<br \/>\n2 <a href=\"https:\/\/rapidapi.com\/ibrarasadbiz\/api\/ip-geo-location-find-ip-location-and-details\/\">.https:\/\/rapidapi.com\/ibrarasadbiz\/api\/ip-geo-location-find-ip-location-and-details\/<\/a><\/p>\n<p>3.<a href=\"https:\/\/rapidapi.com\/xakageminato\/api\/ip-geolocation-ipwhois-io\/-\" target=\"_blank\" rel=\"noopener\">https:\/\/rapidapi.com\/xakageminato\/api\/ip-geolocation-ipwhois-io\/-<\/a><\/p>\n<p><strong><em>Paid API to get the IP Address Of the User:<\/em><\/strong><\/p>\n<p><a href=\"https:\/\/developers.google.com\/maps\/documentation\/geolocation\/get-api-key\">https:\/\/developers.google.com\/maps\/documentation\/geolocation\/get-api-key<\/a><\/p>\n<p><strong><em>we are using free API :<\/em><\/strong>&#8211;<a href=\"https:\/\/ipapi.co\/json\" target=\"_blank\" rel=\"noopener\">https:\/\/ipapi.co\/json<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57384\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/third-api-img-1.png\" alt=\"Blog image\" width=\"850\" height=\"360\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/third-api-img-1.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/third-api-img-1-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/third-api-img-1-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/third-api-img-1-624x264.png 624w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Create a Form :-<\/h4>\n<p><em>src\/Form\/DemoappLocationBlockForm.php:<\/em><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><strong>\u00a0Here is the Example Code of .PHP file<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57392\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code2-1.png\" alt=\"Blog image\" width=\"850\" height=\"360\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57393\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code2-2.png\" alt=\"Blog image\" width=\"850\" height=\"360\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57394\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code2-3.png\" alt=\"Blog image\" width=\"850\" height=\"360\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57395\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code2-4.png\" alt=\"Blog image\" width=\"850\" height=\"360\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57396\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/code2-5.png\" alt=\"Blog image\" width=\"850\" height=\"360\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Next, Go to Your Drupal Site and Install the Location Dropdown Block:<\/h4>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57386\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/fourth-install-img-1.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fourth-install-img-1.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fourth-install-img-1-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fourth-install-img-1-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fourth-install-img-1-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Place the Location Dropdown Block into the Header Region:<\/h4>\n<p><em>Go to structure\/block layout\/<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-57385\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/fifth-img-1.png\" alt=\"Blog image\" width=\"850\" height=\"360\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fifth-img-1.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fifth-img-1-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fifth-img-1-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/fifth-img-1-624x264.png 624w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3>We can now see the location of the user as per region:<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-57387\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/last-img.png\" alt=\"Blog image\" width=\"625\" height=\"265\" srcset=\"https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/last-img.png 850w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/last-img-300x127.png 300w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/last-img-768x325.png 768w, https:\/\/2thenew.online\/blog\/wp-content\/uploads\/2023\/05\/last-img-624x264.png 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>If you still have any questions regarding the topic, drop your comments down below.<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name &#8216;Location&#8217;: structure\/taxonomy\/Location &nbsp; Then Create Country as Parent Term And Region as Child Term accordingly : &nbsp; Create a Custom Module For [&hellip;]<\/p>\n","protected":false},"author":1528,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":9,"footnotes":""},"categories":[3602],"tags":[4674,5248],"class_list":["post-57397","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal-org","tag-location"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name &#039;Location&#039;: structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yash Malviya\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name &#039;Location&#039;: structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name &#039;Location&#039;: structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#article\",\"name\":\"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog\",\"headline\":\"How to Create Custom Location Dropdown Block On Your Drupal Site\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yash-malviya\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2023\\\/05\\\/first-1.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#articleImage\"},\"datePublished\":\"2023-05-22T17:22:55+05:30\",\"dateModified\":\"2023-05-30T17:34:06+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#webpage\"},\"articleSection\":\"Drupal, Drupal.org, Location\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"position\":2,\"name\":\"Drupal\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#listItem\",\"name\":\"How to Create Custom Location Dropdown Block On Your Drupal Site\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#listItem\",\"position\":3,\"name\":\"How to Create Custom Location Dropdown Block On Your Drupal Site\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yash-malviya\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yash-malviya\\\/\",\"name\":\"Yash Malviya\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/5cc20b7d-0238-4286-aa6a-9e72820bf920_4826-Yash-Malviya-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Yash Malviya\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/\",\"name\":\"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog\",\"description\":\"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name 'Location': structure\\\/taxonomy\\\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yash-malviya\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/yash-malviya\\\/#author\"},\"datePublished\":\"2023-05-22T17:22:55+05:30\",\"dateModified\":\"2023-05-30T17:34:06+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog","description":"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name 'Location': structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For","canonical_url":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#article","name":"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog","headline":"How to Create Custom Location Dropdown Block On Your Drupal Site","author":{"@id":"https:\/\/2thenew.online\/blog\/author\/yash-malviya\/#author"},"publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/first-1.png","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#articleImage"},"datePublished":"2023-05-22T17:22:55+05:30","dateModified":"2023-05-30T17:34:06+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#webpage"},"articleSection":"Drupal, Drupal.org, Location"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/drupal\/#listItem","name":"Drupal"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/drupal\/#listItem","position":2,"name":"Drupal","item":"https:\/\/2thenew.online\/blog\/category\/drupal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#listItem","name":"How to Create Custom Location Dropdown Block On Your Drupal Site"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#listItem","position":3,"name":"How to Create Custom Location Dropdown Block On Your Drupal Site","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/drupal\/#listItem","name":"Drupal"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.online\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.online\/blog\/author\/yash-malviya\/#author","url":"https:\/\/2thenew.online\/blog\/author\/yash-malviya\/","name":"Yash Malviya","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/5cc20b7d-0238-4286-aa6a-9e72820bf920_4826-Yash-Malviya-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Yash Malviya"}},{"@type":"WebPage","@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#webpage","url":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/","name":"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog","description":"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name 'Location': structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.online\/blog\/author\/yash-malviya\/#author"},"creator":{"@id":"https:\/\/2thenew.online\/blog\/author\/yash-malviya\/#author"},"datePublished":"2023-05-22T17:22:55+05:30","dateModified":"2023-05-30T17:34:06+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.online\/blog\/#website","url":"https:\/\/2thenew.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog","og:description":"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name 'Location': structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For","og:url":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/","og:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"How to Create Custom Location Dropdown Block On Your Drupal Site | TO THE NEW Blog","twitter:description":"Here we are creating the Location Dropdown Block (Country-Region Dropdown) with the help of taxonomy terms. Steps:- First of all, We have to go on over Drupal Site and Create the Vocabulary Name 'Location': structure\/taxonomy\/Location Then Create Country as Parent Term And Region as Child Term accordingly : Create a Custom Module For","twitter:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"57397","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65e0652918a9b","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2023-05-30 11:52:55","updated":"2024-02-29 11:06:17","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\/category\/drupal\/\" title=\"Drupal\">Drupal<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Create Custom Location Dropdown Block On Your Drupal Site\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.online\/blog"},{"label":"Drupal","link":"https:\/\/2thenew.online\/blog\/category\/drupal\/"},{"label":"How to Create Custom Location Dropdown Block On Your Drupal Site","link":"https:\/\/2thenew.online\/blog\/how-to-create-custom-location-dropdown-block-on-your-drupal-site\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/57397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/users\/1528"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/comments?post=57397"}],"version-history":[{"count":2,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/57397\/revisions"}],"predecessor-version":[{"id":57547,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/57397\/revisions\/57547"}],"wp:attachment":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/media?parent=57397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/categories?post=57397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/tags?post=57397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}