View tag: Wordpress

Cover image from Migrate Wordpress Database

Migrate Wordpress Database

September 15, 2015
I recently found the WP-CLI library and have been investigating ways I can integrate it into my workflow. I should note here that we use shared hosting extensively. Ideally the preferred solution would be to use a true migration tool. This is not always possible with shared hosting. To use the tool the following commands would be issued: migrate_wordpress.sh dev production This command would pull the latest version of the wordpress database from the production server.
Read more
Cover image from Wordpress wp_nav_menu output class when menu item has children

Wordpress wp_nav_menu output class when menu item has children

September 9, 2011
I recently wanted to insert a class for the case where a menu item has children in Wordpress. There doesn’t appear to be any option to do this in wp_nav_menu function, so I started doing some research. I found out from this article how to add a ’last-menu-item’ css class. This doesn’t quite work for what I wanted though, because the returned data object from Wordpress doesn’t tell you if the current node has children.
Read more