Last active
April 17, 2019 23:47
-
-
Save BenBroide/39602755b1b4e7d36429734428e6eb71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function create_terms( ){ | |
array=("$@") | |
for tax; do true; done | |
for term in "${array[@]}" | |
do | |
wp term create $tax "$term" --allow-root | |
done | |
} | |
listing_categories=( | |
"Studio" | |
"1 bedroom" | |
"2 bedrooms" | |
"3 bedrooms" | |
"4 bedrooms" | |
) | |
create_terms "${listing_categories[@]}" listing_category | |
areas=( | |
"Downtown" | |
"Midtown left" | |
"Upper East" | |
"Upper West" | |
"Lower East Site" | |
"Noho Right" | |
) | |
create_terms "${areas[@]}" area | |
amenities=( | |
"Doorman" | |
"Rooftop" | |
"Elevator" | |
"Pool" | |
"Wifi" | |
"TV" | |
) | |
create_terms "${amenities[@]}" amenities |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment