August 2017
Beginner
412 pages
10h 30m
English
The final thing you can do to realize your new book custom post type fully is to change its display in the wp-admin. You don't need to know the WordPress user who created a given book, but you do want to see the book categories and the thumbnail. Let's go back to functions.php. First, we'll change the columns that are displayed:
function ahskk_custom_columns($defaults) { global $wp_query, $pagenow; if ($pagenow == 'edit.php') { unset($defaults['author']); unset($defaults['categories']); unset($defaults['date']); $defaults['book_category'] = 'Categories'; $defaults['thumbnail'] = 'Image'; } return $defaults; } add_filter('manage_book_posts_columns', 'ahskk_custom_columns'); function ahskk_show_columns($name) { ...Read now
Unlock full access