php – Add Change Author in Type Post Quick Edit

Question:

I created a type post to customize a client's wordpress admin, everything works perfectly, but the option to change the post author in "quick edit" doesn't appear, I know by default it won't show for custom fields, I I have code to include in functions.php to show but I did it and I can't adjust this function, does anyone know where I'm going wrong or can they help me with another solution. It's not the Screen Option setting. Here's the Code I have below:

          // ADICIONAR EDITAR AUTOR

         function allowAuthorEditing()
        {
        add_post_type_support( 'mytype', 'author' );
         }
          add_action('init','allowAuthorEditing');

Answer:

I found the Solution Guys, I'll pass the code to analyze how the correct function was.

                 // ADICIONAR EDITAR AUTOR

               add_action('init', 'wptips_custom_init');
                   function wptips_custom_init() {
                   add_post_type_support( 'places', array(  'author' ) );
                   }

If you need to include other functions, you just need to include in the array what you need to appear in the type post you created.

Scroll to Top