WordPress.org

Ready to get started?Download WordPress

Forums

I can't able to find any change defining " custom post type" (9 posts)

  1. helpin
    Member
    Posted 3 years ago #

    How can I make changes to post types mentioned here:http://wpengineer.com/impressions-of-custom-post-type/?

    I entered the code in functions.php
    under function editoptions() {

    function post_type_movies() {
    	register_post_type( 'movies',
                    array( 'label' => __('Movies'), 'public' => true, 'show_ui' => true ) );
    	register_taxonomy_for_object_type('post_tag', 'movies');
    }
    add_action('init', 'post_type_movies');

    .But It doesn't make any changes for any site in my multisite network. Am I missing anything?

    Thank you !

  2. forunner
    Member
    Posted 3 years ago #

    I've tried your code and it works, the "Movies" category appears on my admin board

  3. Did you put that code in the functions.php of the theme that you're using across all sites?

  4. helpin
    Member
    Posted 3 years ago #

    Thanks for your quick response @Andrea and forunner
    I tried it again .It worked for me only If I tried the same theme for both main site and children sites.

    Does it works If different sites have different themes?

  5. forunner
    Member
    Posted 3 years ago #

    I think you have to put the code in each theme because functions.php is a part of the theme.
    [I'm not sure]

  6. Yep. the code goes in the functions.php file of the them you are using on that blog.

  7. helpin
    Member
    Posted 3 years ago #

    Thanks !
    The similar problem is being existed for some plugins too .

  8. Yes, each site in a network has its own settings.

  9. helpin
    Member
    Posted 3 years ago #

    Thanks again !

Topic Closed

This topic has been closed to new replies.

About this Topic