Isssues getting this started
-
Hey there,
I’m trying to get your plugin to work with regular post types. If it works with that, I’ll likely purchase the premium version as I need this to work with custom post types.
This is the code I used to display a test custom column:
add_filter( 'manage_posts_columns', 'my_manage_posts_columns' ); function my_manage_posts_columns( $columns ) { $columns['wpcf-price'] = 'Price'; return $columns; } add_action('manage_posts_custom_column', 'my_show_columns'); function my_show_columns($name) { global $post; switch ($name) { case 'wpcf-price': $price = get_post_meta($post->ID, 'wpcf-price', true); echo $price; } }
1. I wasn’t able to display the custom field value until I added the manage_posts_custom_column action. This wasn’t mentioned in the set up instructions at https://aihrus.zendesk.com/entries/24800411-How-do-I-add-custom-columns-to-my-edit-page- so I’m wondering if this was a required step or if it just assumed people knew how to do it. The custom field value wasn’t displayed until I added it this second snippet.
2. I actually still can’t quick edit the “Price” yet. The price is now listed in it’s own custom column but when I hit the quick edit button, it isn’t displayed. I don’t see any plugin settings that need to be toggled to get this working. Am I missing something?
Thanks so much. Excited to get this running!
David
- The topic ‘Isssues getting this started’ is closed to new replies.