Custom Post Type UI
[resolved] Not showing in Admin UI (9 posts)

  1. Inje
    Posted 2 years ago #

    I did the following:

    1) Created custom post type
    2) copied code & pasted in functions.php
    3) deleted the custom post type from CPT UI

    Now i can visit the post type by going to "/edit.php?post_type=properties", but it doesn't show in Admin UI.

    Here is the code i'm using:

    /* Register Custom Post Type 'Properties' */
    add_action('init', 'cptui_register_my_cpt');
    function cptui_register_my_cpt() {
    register_post_type('properties', array(
    'label' => 'Properties',
    'description' => '',
    'public' => true,
    'show_ui' => true,
    'show_in_menu' => 1,
    'capability_type' => 'post',
    'hierarchical' => true,
    'rewrite' => array('slug' => 'properties', 'with_front' => 1),
    'query_var' => true,
    'has_archive' => true,
    'menu_position' => '15',
    'supports' => array('title','editor','thumbnail'),
    'taxonomies' => array('locations','types','bedrooms'),
    'labels' => array (
      'name' => 'Properties',
      'singular_name' => 'Property',
      'menu_name' => 'Properties',
      'add_new' => 'Add New',
      'add_new_item' => 'Add New Property',
      'edit' => 'Edit',
      'edit_item' => 'Edit Property',
      'new_item' => 'New Property',
      'view' => 'View Property',
      'view_item' => 'View Property',
      'search_items' => 'Search Properties',
      'not_found' => 'No Properties Found',
      'not_found_in_trash' => 'No Properties found in trash',
      'parent' => 'Parent Property',
    ) ); }


  2. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Are you using the beta 0.8.1? or are you using the 0.8 from the .org repo?

    I noticed this morning that the 0.8.1 was having admin menu issues after my work this weekend, and will be debugging it soon.

  3. Inje
    Posted 2 years ago #

    The problem was with 0.8 which i downloaded from here: http://wordpress.org/extend/plugins/custom-post-type-ui/

    I updated to 0.8.1 beta from the repo and still the same

  4. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Yeah, I know it's an issue in 0.8.1, but I was hoping it wasn't one in 0.8

    Would you be fine with deleting the current folder from your plugins directory, and re-uploading a fresh copy of 0.8? Your data will be fine and not deleted, so it should all *click* back into place. Plugin doesn't delete any of the posts for the post type, nor does it delete the WP options key/values that it uses to store what to register.

    I'm thinking the output above is from the "get code" link for 0.8.1 which is what I was working on this weekend and is when I think I messed up the "Show in Admin" stuff. It shouldn't be doing it via 0.8

  5. Inje
    Posted 2 years ago #

    Did what you said, still not visible. I even tried a different post type this time, but still nothing

  6. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Hi Inje, hope you don't mind being an incidental beta tester for me, but you're responding.

    Could you go grab a fresh copy of the 0.8.1 version from GitHub? If you're grabbing the entire directory, please make sure that we're deleting the previous directory first. The reason for this is I'm hoping that we're not merging the files, and instead replacing completely.

    I'm hoping this latest git push has all the issues solved that I wanted for this point release.

  7. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Also, for an explanation if you're curious why the pasted code above is not working:

    'show_in_menu' => 1, <---needs to be a Boolean true, not a numeral 1. Same thing for 'with_front' => 1, both of which are fixed in the latest 0.8.1

  8. Inje
    Posted 2 years ago #

    hey Michael. Sorry for the delayed reply. I did what you said and everything is working ok now! Thanks :)

  9. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Awesome. I knew something had to be a bit funky there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.