26 reputation
3
bio website
location
age
visits member for 1 year, 9 months
seen Jan 29 '13 at 13:00

Dec
6
comment Function to delete a term when a custom post with the same slug is trashed
So... the hook first. Since the 'trash action' redirects, the normal console log and vardump is out of the question. You either use the built in logging system or you just simply set a cookie inside the hook something like this: setcookie("hook_running","true",time()+7200); and check it inside the Chrome inspector (f12/resources/cookies). If the hook is ok and still not working just change it to 'admin_init' and pass a $post_id manually and you can use var_dump($varname) manually. You will see the values injected at the top of the admin page.
Dec
6
awarded  Editor
Dec
6
revised How to import individual blog posts into Wordpress?
edited body
Dec
6
comment Function to delete a term when a custom post with the same slug is trashed
Sorry, I missed that! What I`m trying to say here is that you should be able to debug this stuff on your own without any problem using, var_dump(), echo() or something more advanced debug tool step by step. Is your hook fires at all (delete_artist_term_automatically)? With other words trashing the artist is actualy calls your function? If the answer is yes $theterm->term_id is gving you an actual id? ...and so on.
Dec
5
comment Function to delete a term when a custom post with the same slug is trashed
You still using '$theterm->term_id' in your code. term_exists() returns the id NOT an object. as I said try to go through your code and see which part is failing. Use var_dump or echo in every step to make sure what is happening.
Dec
5
answered Advanced Custom Fields - Check if multiple get_fields exist?
Dec
5
answered Function to delete a term when a custom post with the same slug is trashed
Dec
4
awarded  Teacher
Dec
4
comment Show Available Taxonomy List with Current Category
I didn`t say yo have to use the plugin. you can simply check out the source code. The method what scribu originally used is in the core now because of him. The only thing I`m not sure about ist the counter as you described but his widget does that. Check out the WP_Query docs for multiple taxonomy queries
Dec
4
answered How to change the language of the 'Reset Password' page
Dec
4
answered Show Available Taxonomy List with Current Category
Dec
4
answered How to import individual blog posts into Wordpress?
Nov
20
awarded  Tumbleweed