How to show a hierarchical terms list?

I have a hierarchical taxonomy called ‘geographical locations’. It contains continents on a first level, and then the countries for each one. Example : Europe – Ireland – Spain – Sweden Asia – Laos – Thailand – Vietnam etc. Using get_terms() I managed to output the full list of terms, but the continents get mixed up with the countries, in one big flat list. How can I output a hierarchical list like above? Source:

How to test wp_cron?

This is kind of a stupid question… I scheduled a action to run every hour: if(!wp_next_scheduled(‘my_hourly_events’)) wp_schedule_event(time(), ‘hourly’, ‘my_hourly_events’); add_action(‘my_hourly_events’, ‘the_function_to_run’); function the_function_to_run(){ echo ‘it works!’; } How can I test if this works without waiting an hour? 🙂 I tried adding wp_clear_scheduled_hook(‘my_hourly_events’); before this code and adding wp_cron() after, but I don’t see my function running… edit: ok, I added a trigger_error() inside my function, checked out the apache error log, and it’s there 🙂 So now I’m even more confused: How can the wp-cron run in the background?…

Using wp_query is it possible to orderby taxonomy?

My question is simple, I’m using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query. Now my problem is I would like to orderby the taxonomy, but from documentation and searching on the web I can’t find a solution. The orderby in WP_Query lets you order by a bunch of fields even custom meta fields but it doesn’t seem to support taxonomy. Any pointers in the right direction? Thank you all. Source: