byronyasgur
Member
Posted 1 year ago #
could someone tell me whether or not register_post_type() needs to be called via add_action and if so is it possible to call it from any other hook than init .... ultimiatly i am trying to create a form&button to register a new post type - any help appreciated
The init action is recommended--but take a look at how a plugin does that...
http://wordpress.org/extend/plugins/custom-post-type-ui/
byronyasgur
Member
Posted 1 year ago #
thanks have looked at customposttypeui but i need to do it in the code and i cant figure out how he did it - however someone else has advised me that the form output needs to go into the options table and then the add_action(init needs to call some function to check this table and THEN run the register_post_type ... i will try that later
manuel_rocha
Member
Posted 1 year ago #
Hi guys!
I have a problem with custom posts types, I have created a new post type for books, everything goes well until I click the publish button, it redirects me to the 'Posts' panel, like if the book post was a normal post, and the new book post I have published does not appear in the books list (the list of books posts), does anyone of you know why is it?