Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've created a custom post section and removed all of the default items (title, editor, etc...) using add_action and added my own custom meta boxes.

The Issue: Since i've removed the default Title box there's no way to get back into the post since it shows the custom meta box content in custom columns on the top level of the section: Custom Meta Column Display

The Question: How do I add the "Edit | Quick Edit | Trash | View" options to the custom column like WordPress does by default with the Title?

Code being used for section:

add_action('init', 'addchic_register');

function addchic_register() {

    $labels = array(
        'name' => _x('Addy Chicken', 'post type general name'),
        'singular_name' => _x('Addy Chicken', 'post type singular name'),
        'add_new' => _x('Add New', 'addchic item'),
        'add_new_item' => __('Add New Convo Item'),
        'edit_item' => __('Edit Convo Item'),
        'new_item' => __('New Convo Item'),
        'view_item' => __('View Convos Item'),
        'search_items' => __('Search Convos'),
        'not_found' =>  __('Nothing found'),
        'not_found_in_trash' => __('Nothing found in Trash'),
        'parent_item_colon' => ''
    );

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        /*'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',*/
        'rewrite' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'menu_position' => null,
        'supports' => array('')
      ); 

    register_post_type( 'addchic' , $args );
}

Meta boxes:

add_meta_box("addy_meta", "Addy", "addy_meta", "addchic", "normal", "low");


function addy_meta(){
  global $post;
  $custom = get_post_custom($post->ID);
  $addy = $custom["addy"][0];
  ?>
  <input size="100" name="addy" value="<?php echo $addy; ?>" />
  <?php
}

Thanks!

share|improve this question

2 Answers 2

I don't think there is an easy way to get that part, it's created in the _post_row() function together with the title column. You'll have to copy that part of the code in your own column callback.

share|improve this answer
    
Thanks for the help, i'll look into post_row! –  jetDL Jan 13 '11 at 14:32

I had not verified this in practice, but basic idea would be to add custom column and reuse code from _post_row() function that generates actions in it.

share|improve this answer
    
Thanks for the help, i'll look into post_row! –  jetDL Jan 13 '11 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.