Closed diggy closed 7 years ago
Great job!!
As I'm new to WP-CLI, I didn't know about runcommand
and my code was failing with wp menu location assign main location___language
. So thank you, as I understand now how to force wp-cli to do what I want :)
Hmm, a little question though, how can I know with the result obtained with porcelain which id matches which language? ( I'm using all the commands with Ansible to automate tasks )
@gbouteiller I'm afraid you'd have to parse the output of wp theme mod get nav_menu_locations
:
+--------------------+-------+
| key | value |
+--------------------+-------+
| nav_menu_locations | => |
| primary | 53 |
| primary___de | 54 |
| social | 55 |
| social___de | 56 |
+--------------------+-------+
Create a new menu for each language, AND assign it to a location.