[wp-hackers] How to dynamically register hook with post type ?

scribu scribu at gmail.com
Thu Jan 19 11:23:15 UTC 2012


Oh, I see. The problem was that when you added the code directly in your
PHP file, the post types had not been registered yet.

So yes, moving the code to a callback hooked to 'init' (or 'wp_loaded") is
the correct way to go about it.

-- 
http://scribu.net


More information about the wp-hackers mailing list