Trying to create a custom column for a custom post type

You’re missing a couple of things hook for registering custom column is manage_edit-{$post_type}_columns thus you have to use manage_edit-Featured_columns on line one (instead of yours manage_Featured_columns ). hook for getting custom column content is manage_{$post_type}_posts_custom_column thus you should use this code in second add_action call: manage_Featured_posts_custom_column You have to add define columns which are about … Read more

Loop through multiple custom taxonomy terms and display posts for a custom post type

If you look at your var_dump, near the end, you will see the actual query being used. SELECT wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (93) ) AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’) AND (wp_posts.post_status=”publish” OR wp_posts.post_author = 1 AND wp_posts.post_status=”private”) GROUP BY wp_posts.ID ORDER BY … Read more

Listing all custom post types using a specific term on the said term’s template page, in groups

Your code, when working, will consume sooo much resources. When implemented in this way – throught custom page template, WordPress will call for a content of that page (1 query) and after that it will call a query for each custom post type – another 4 queries. That’s a lot, really. I would suggest you … Read more

Remove (Unattached) Attach from “Uploaded to” in Media Library

It seems there is no other way than de-registering the column and building your own. The code of the custom column is adapted from class-wp-media-list-table.php. add_filter( ‘manage_upload_columns’, ‘columns_manage_wpse_85405’ ); add_action( ‘manage_media_custom_column’, ‘columns_display_wpse_85405’, 10, 2 ); function columns_manage_wpse_85405( $columns ) { unset( $columns[‘parent’] ); $columns[‘attached’] = ‘Parent’; return $columns; } function columns_display_wpse_85405( $column_name, $post_id ) { … Read more