Change CPT 'Add New Post' to CPT Name











up vote
0
down vote

favorite












How do I change the 'Add New Post' to reflect the name of my custom post type? Do I add something to the following code. I know it can be done...



function create_post_type() {
register_post_type( 'venues',
array(
'labels' => array(
'name' => __( 'Venues' ),
'singular_name' => __( 'Venue' )
),
);


Screenshot










share|improve this question


























    up vote
    0
    down vote

    favorite












    How do I change the 'Add New Post' to reflect the name of my custom post type? Do I add something to the following code. I know it can be done...



    function create_post_type() {
    register_post_type( 'venues',
    array(
    'labels' => array(
    'name' => __( 'Venues' ),
    'singular_name' => __( 'Venue' )
    ),
    );


    Screenshot










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      How do I change the 'Add New Post' to reflect the name of my custom post type? Do I add something to the following code. I know it can be done...



      function create_post_type() {
      register_post_type( 'venues',
      array(
      'labels' => array(
      'name' => __( 'Venues' ),
      'singular_name' => __( 'Venue' )
      ),
      );


      Screenshot










      share|improve this question













      How do I change the 'Add New Post' to reflect the name of my custom post type? Do I add something to the following code. I know it can be done...



      function create_post_type() {
      register_post_type( 'venues',
      array(
      'labels' => array(
      'name' => __( 'Venues' ),
      'singular_name' => __( 'Venue' )
      ),
      );


      Screenshot







      wordpress






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 11 at 18:08









      mr_wahoo

      54




      54
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          In the labels array add:



          'add_new'            => _x( 'Add New', 'venue', 'your-plugin-textdomain' ),
          'add_new_item' => __( 'Add New Venue', 'your-plugin-textdomain' ),


          Also read the WordPress codex:
          https://codex.wordpress.org/Function_Reference/register_post_type






          share|improve this answer




























            up vote
            0
            down vote













            You can use the code below to get the result expected.



            <?php 

            $labels = array(
            'name' => _x( 'Venues', 'Post Type General Name', 'text-domain' ),
            'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'text-domain' ),
            'menu_name' => esc_html__( 'Venues', 'text-domain' ),
            'parent_item_colon' => esc_html__( 'Parent Venues', 'text-domain' ),
            'all_items' => esc_html__( 'All Venues', 'text-domain' ),
            'view_item' => esc_html__( 'View Venues', 'text-domain' ),
            'add_new_item' => esc_html__( 'Add New Venues', 'text-domain' ),
            'add_new' => esc_html__( 'Add New', 'text-domain' ),
            'edit_item' => esc_html__( 'Edit Venues', 'text-domain' ),
            'update_item' => esc_html__( 'Update Venues', 'text-domain' ),
            'search_items' => esc_html__( 'Search Venues', 'text-domain' ),
            'not_found' => esc_html__( 'Not Found', 'text-domain' ),
            'not_found_in_trash' => esc_html__( 'Not found in Trash', 'text-domain' ),
            );

            // Set other options for Custom Post Type

            $args = array(
            'label' => esc_html__( 'venues', 'text-domain' ),
            'description' => esc_html__( 'Venues news and reviews', 'text-domain' ),
            'labels' => $labels,
            // Features this CPT supports in Post Editor
            'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
            // You can associate this CPT with a taxonomy or custom taxonomy.
            'taxonomies' => array( 'main_product_category' ),

            'hierarchical' => false,
            'public' => true,
            'show_ui' => true,
            'show_in_menu' => true,
            'show_in_nav_menus' => true,
            'show_in_admin_bar' => true,
            'can_export' => true,
            'has_archive' => true,
            'exclude_from_search' => false,
            'publicly_queryable' => true,
            'capability_type' => 'post',
            );


            register_post_type( 'venues', $args );


            Hope this will help.






            share|improve this answer





















              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53251680%2fchange-cpt-add-new-post-to-cpt-name%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote



              accepted










              In the labels array add:



              'add_new'            => _x( 'Add New', 'venue', 'your-plugin-textdomain' ),
              'add_new_item' => __( 'Add New Venue', 'your-plugin-textdomain' ),


              Also read the WordPress codex:
              https://codex.wordpress.org/Function_Reference/register_post_type






              share|improve this answer

























                up vote
                1
                down vote



                accepted










                In the labels array add:



                'add_new'            => _x( 'Add New', 'venue', 'your-plugin-textdomain' ),
                'add_new_item' => __( 'Add New Venue', 'your-plugin-textdomain' ),


                Also read the WordPress codex:
                https://codex.wordpress.org/Function_Reference/register_post_type






                share|improve this answer























                  up vote
                  1
                  down vote



                  accepted







                  up vote
                  1
                  down vote



                  accepted






                  In the labels array add:



                  'add_new'            => _x( 'Add New', 'venue', 'your-plugin-textdomain' ),
                  'add_new_item' => __( 'Add New Venue', 'your-plugin-textdomain' ),


                  Also read the WordPress codex:
                  https://codex.wordpress.org/Function_Reference/register_post_type






                  share|improve this answer












                  In the labels array add:



                  'add_new'            => _x( 'Add New', 'venue', 'your-plugin-textdomain' ),
                  'add_new_item' => __( 'Add New Venue', 'your-plugin-textdomain' ),


                  Also read the WordPress codex:
                  https://codex.wordpress.org/Function_Reference/register_post_type







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 11 at 19:36









                  Vos

                  964




                  964
























                      up vote
                      0
                      down vote













                      You can use the code below to get the result expected.



                      <?php 

                      $labels = array(
                      'name' => _x( 'Venues', 'Post Type General Name', 'text-domain' ),
                      'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'text-domain' ),
                      'menu_name' => esc_html__( 'Venues', 'text-domain' ),
                      'parent_item_colon' => esc_html__( 'Parent Venues', 'text-domain' ),
                      'all_items' => esc_html__( 'All Venues', 'text-domain' ),
                      'view_item' => esc_html__( 'View Venues', 'text-domain' ),
                      'add_new_item' => esc_html__( 'Add New Venues', 'text-domain' ),
                      'add_new' => esc_html__( 'Add New', 'text-domain' ),
                      'edit_item' => esc_html__( 'Edit Venues', 'text-domain' ),
                      'update_item' => esc_html__( 'Update Venues', 'text-domain' ),
                      'search_items' => esc_html__( 'Search Venues', 'text-domain' ),
                      'not_found' => esc_html__( 'Not Found', 'text-domain' ),
                      'not_found_in_trash' => esc_html__( 'Not found in Trash', 'text-domain' ),
                      );

                      // Set other options for Custom Post Type

                      $args = array(
                      'label' => esc_html__( 'venues', 'text-domain' ),
                      'description' => esc_html__( 'Venues news and reviews', 'text-domain' ),
                      'labels' => $labels,
                      // Features this CPT supports in Post Editor
                      'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
                      // You can associate this CPT with a taxonomy or custom taxonomy.
                      'taxonomies' => array( 'main_product_category' ),

                      'hierarchical' => false,
                      'public' => true,
                      'show_ui' => true,
                      'show_in_menu' => true,
                      'show_in_nav_menus' => true,
                      'show_in_admin_bar' => true,
                      'can_export' => true,
                      'has_archive' => true,
                      'exclude_from_search' => false,
                      'publicly_queryable' => true,
                      'capability_type' => 'post',
                      );


                      register_post_type( 'venues', $args );


                      Hope this will help.






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        You can use the code below to get the result expected.



                        <?php 

                        $labels = array(
                        'name' => _x( 'Venues', 'Post Type General Name', 'text-domain' ),
                        'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'text-domain' ),
                        'menu_name' => esc_html__( 'Venues', 'text-domain' ),
                        'parent_item_colon' => esc_html__( 'Parent Venues', 'text-domain' ),
                        'all_items' => esc_html__( 'All Venues', 'text-domain' ),
                        'view_item' => esc_html__( 'View Venues', 'text-domain' ),
                        'add_new_item' => esc_html__( 'Add New Venues', 'text-domain' ),
                        'add_new' => esc_html__( 'Add New', 'text-domain' ),
                        'edit_item' => esc_html__( 'Edit Venues', 'text-domain' ),
                        'update_item' => esc_html__( 'Update Venues', 'text-domain' ),
                        'search_items' => esc_html__( 'Search Venues', 'text-domain' ),
                        'not_found' => esc_html__( 'Not Found', 'text-domain' ),
                        'not_found_in_trash' => esc_html__( 'Not found in Trash', 'text-domain' ),
                        );

                        // Set other options for Custom Post Type

                        $args = array(
                        'label' => esc_html__( 'venues', 'text-domain' ),
                        'description' => esc_html__( 'Venues news and reviews', 'text-domain' ),
                        'labels' => $labels,
                        // Features this CPT supports in Post Editor
                        'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
                        // You can associate this CPT with a taxonomy or custom taxonomy.
                        'taxonomies' => array( 'main_product_category' ),

                        'hierarchical' => false,
                        'public' => true,
                        'show_ui' => true,
                        'show_in_menu' => true,
                        'show_in_nav_menus' => true,
                        'show_in_admin_bar' => true,
                        'can_export' => true,
                        'has_archive' => true,
                        'exclude_from_search' => false,
                        'publicly_queryable' => true,
                        'capability_type' => 'post',
                        );


                        register_post_type( 'venues', $args );


                        Hope this will help.






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          You can use the code below to get the result expected.



                          <?php 

                          $labels = array(
                          'name' => _x( 'Venues', 'Post Type General Name', 'text-domain' ),
                          'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'text-domain' ),
                          'menu_name' => esc_html__( 'Venues', 'text-domain' ),
                          'parent_item_colon' => esc_html__( 'Parent Venues', 'text-domain' ),
                          'all_items' => esc_html__( 'All Venues', 'text-domain' ),
                          'view_item' => esc_html__( 'View Venues', 'text-domain' ),
                          'add_new_item' => esc_html__( 'Add New Venues', 'text-domain' ),
                          'add_new' => esc_html__( 'Add New', 'text-domain' ),
                          'edit_item' => esc_html__( 'Edit Venues', 'text-domain' ),
                          'update_item' => esc_html__( 'Update Venues', 'text-domain' ),
                          'search_items' => esc_html__( 'Search Venues', 'text-domain' ),
                          'not_found' => esc_html__( 'Not Found', 'text-domain' ),
                          'not_found_in_trash' => esc_html__( 'Not found in Trash', 'text-domain' ),
                          );

                          // Set other options for Custom Post Type

                          $args = array(
                          'label' => esc_html__( 'venues', 'text-domain' ),
                          'description' => esc_html__( 'Venues news and reviews', 'text-domain' ),
                          'labels' => $labels,
                          // Features this CPT supports in Post Editor
                          'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
                          // You can associate this CPT with a taxonomy or custom taxonomy.
                          'taxonomies' => array( 'main_product_category' ),

                          'hierarchical' => false,
                          'public' => true,
                          'show_ui' => true,
                          'show_in_menu' => true,
                          'show_in_nav_menus' => true,
                          'show_in_admin_bar' => true,
                          'can_export' => true,
                          'has_archive' => true,
                          'exclude_from_search' => false,
                          'publicly_queryable' => true,
                          'capability_type' => 'post',
                          );


                          register_post_type( 'venues', $args );


                          Hope this will help.






                          share|improve this answer












                          You can use the code below to get the result expected.



                          <?php 

                          $labels = array(
                          'name' => _x( 'Venues', 'Post Type General Name', 'text-domain' ),
                          'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'text-domain' ),
                          'menu_name' => esc_html__( 'Venues', 'text-domain' ),
                          'parent_item_colon' => esc_html__( 'Parent Venues', 'text-domain' ),
                          'all_items' => esc_html__( 'All Venues', 'text-domain' ),
                          'view_item' => esc_html__( 'View Venues', 'text-domain' ),
                          'add_new_item' => esc_html__( 'Add New Venues', 'text-domain' ),
                          'add_new' => esc_html__( 'Add New', 'text-domain' ),
                          'edit_item' => esc_html__( 'Edit Venues', 'text-domain' ),
                          'update_item' => esc_html__( 'Update Venues', 'text-domain' ),
                          'search_items' => esc_html__( 'Search Venues', 'text-domain' ),
                          'not_found' => esc_html__( 'Not Found', 'text-domain' ),
                          'not_found_in_trash' => esc_html__( 'Not found in Trash', 'text-domain' ),
                          );

                          // Set other options for Custom Post Type

                          $args = array(
                          'label' => esc_html__( 'venues', 'text-domain' ),
                          'description' => esc_html__( 'Venues news and reviews', 'text-domain' ),
                          'labels' => $labels,
                          // Features this CPT supports in Post Editor
                          'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
                          // You can associate this CPT with a taxonomy or custom taxonomy.
                          'taxonomies' => array( 'main_product_category' ),

                          'hierarchical' => false,
                          'public' => true,
                          'show_ui' => true,
                          'show_in_menu' => true,
                          'show_in_nav_menus' => true,
                          'show_in_admin_bar' => true,
                          'can_export' => true,
                          'has_archive' => true,
                          'exclude_from_search' => false,
                          'publicly_queryable' => true,
                          'capability_type' => 'post',
                          );


                          register_post_type( 'venues', $args );


                          Hope this will help.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 12 at 10:46









                          Tristup

                          2,7361721




                          2,7361721






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53251680%2fchange-cpt-add-new-post-to-cpt-name%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Florida Star v. B. J. F.

                              Danny Elfman

                              Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues