Title: register post type question
Last modified: August 19, 2016

---

# register post type question

 *  [byronyasgur](https://wordpress.org/support/users/byronyasgur/)
 * (@byronyasgur)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/register-post-type-question/)
 * 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

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/register-post-type-question/#post-1572293)
 * The init action is recommended–but take a look at how a plugin does that…
    [http://wordpress.org/extend/plugins/custom-post-type-ui/](http://wordpress.org/extend/plugins/custom-post-type-ui/)
 *  Thread Starter [byronyasgur](https://wordpress.org/support/users/byronyasgur/)
 * (@byronyasgur)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/register-post-type-question/#post-1572298)
 * 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](https://wordpress.org/support/users/manuel_rocha/)
 * (@manuel_rocha)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/register-post-type-question/#post-1572541)
 * 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?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘register post type question’ is closed to new replies.

## Tags

 * [init](https://wordpress.org/support/topic-tag/init/)
 * [register_post_type](https://wordpress.org/support/topic-tag/register_post_type/)

 * 3 replies
 * 3 participants
 * Last reply from: [manuel_rocha](https://wordpress.org/support/users/manuel_rocha/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/register-post-type-question/#post-1572541)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
