WordPress.org

Support

Support » How-To and Troubleshooting » Where does initalization code belong

Where does initalization code belong

  • I am new to WP. I ran accross a code snippet that allows a custom post type to be used as an event list.

    add_action( ‘init’, ‘create_post_type’ );
    function create_post_type() {
    register_post_type( ‘event’,
    … etc

    I was not told what file to put this code in…
    Where does it belong?
    Where does initalization code belong?
    If it goes in functions.php, where should it be called from?

    Thanks – jz

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where does initalization code belong’ is closed to new replies.