{"id":15315,"date":"2011-10-17T13:40:15","date_gmt":"2011-10-17T13:40:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/post-taxonomy-column\/"},"modified":"2011-10-26T11:56:28","modified_gmt":"2011-10-26T11:56:28","slug":"post-taxonomy-column","status":"publish","type":"plugin","link":"https:\/\/de-at.wordpress.org\/plugins\/post-taxonomy-column\/","author":1901556,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1","stable_tag":"trunk","tested":"","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Post Taxonomy Column","header_author":"Marcus Downing","header_description":"","assets_banners_color":"","last_updated":"2011-10-26 11:56:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.bang-on.net\/","header_author_uri":"http:\/\/www.bang-on.net","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1982,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539324","resolution":"2","location":"plugin","width":1020,"height":656},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539324","resolution":"1","location":"plugin","width":1272,"height":942}},"screenshots":{"1":"A <em>Keywords<\/em> column added to the All Pages listing.","2":"The settings page."}},"plugin_section":[],"plugin_tags":[83,940],"plugin_category":[57],"plugin_contributors":[83365],"plugin_business_model":[],"class_list":["post-15315","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-taxonomies","plugin_category-taxonomy","plugin_contributors-marcusdowning","plugin_committers-marcusdowning"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/post-taxonomy-column.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/post-taxonomy-column\/trunk\/screenshot-1.png?rev=1539324","caption":"A <em>Keywords<\/em> column added to the All Pages listing."},{"src":"https:\/\/ps.w.org\/post-taxonomy-column\/trunk\/screenshot-2.png?rev=1539324","caption":"The settings page."}],"raw_content":"<!--section=description-->\n<p>This plugin improves the All Posts or All Pages view in the admin section by adding columns for\nany taxonomy you wish. There are two ways to use it:<\/p>\n\n<ol>\n<li>Use the setting page to select the taxonomies.<\/li>\n<li>Write code to add a column in exactly the right place.<\/li>\n<\/ol>\n\n<!--section=installation-->\n<p>Install the plugin the normal way:<\/p>\n\n<ol>\n<li>Upload the <code>post-taxonomy-column<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Visit the settings page to switch columns on and off.<\/li>\n<\/ol>\n\n<p>Alternatively, you can use the <code>manage_edit-post_type_columns<\/code> filter to adjust the\ncolumns more precisely.<\/p>\n\n<p>Suppose you have a custom post type called <em>Movies<\/em>,\nand a custom taxonomy called <em>Year of Release<\/em> with the code <code>year<\/code>,\nand you'd like to add this to the 'All Movies' listing in the admin.<\/p>\n\n<p>Put the following code into <code>functions.php<\/code> or a plugin:<\/p>\n\n<pre><code>add_filter(\"manage_edit-movie_columns\", \"add_movie_columns\");\nfunction add_movie_columns ($columns) {\n    $columns['year'] = 'Year of Release';\n    return $columns;\n}\n<\/code><\/pre>\n\n<p>This plugin will then fill in values for the Year column.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Where do these taxonomies come from?<\/dt>\n<dd><p>You'll need to add them, either with code in your theme's <code>functions.php<\/code> or using a plugin.\nThis plugin does not register or manage taxonomies.<\/p><\/dd>\n<dt>Does this work with custom post types?<\/dt>\n<dd><p>Yes.<\/p><\/dd>\n<dt>Can I use this plugin to create custom post types?<\/dt>\n<dd><p>No, this plugin does not register or manage custom post types.\nYou'll need to add them either with code in your theme's <code>functions.php<\/code> or using a plugin.<\/p><\/dd>\n<dt>My taxonomy\/post type isn't showing up. What's wrong?<\/dt>\n<dd><p>Make sure your taxonomies and post types are public:<\/p>\n\n<pre><code> register_post_type('foo', array(\n   ...\n   'public' =&gt; true\n ));\n<\/code><\/pre><\/dd>\n<dt>What will this do if I add a column code that isn't a taxonomy?<\/dt>\n<dd><p>Nothing. You'll get a blank cell.<\/p><\/dd>\n<dt>Can I have more than one taxonomy column?<\/dt>\n<dd><p>Yes, as many as you like as long as the column's ID matches up with the taxonomy ID.<\/p><\/dd>\n<dt>Can I control the order of the columns? How do I add a column in the middle rather than the end?<\/dt>\n<dd><p>To fine-tune the order of the columns, you will need to control them yourself.\nTurn off the checkboxes in the settings page, and instead use the <code>manage_edit-<\/code><em>xxx<\/em><code>_columns<\/code>\nfilter which lets you adjust the columns any way you wish.<\/p>\n\n<p>For example, to add the <code>year<\/code> column after the <code>author<\/code> column:<\/p>\n\n<pre><code>add_filter(\"manage_edit-movie_columns\", \"add_movie_columns\");\nfunction add_movie_columns ($columns) {\n    $out = array();\n    foreach ($columns as $key =&gt; $value) {\n      $out[$key] = $value;\n      if ($key == \"author\")\n        $out[\"year\"] = \"Year of Release\";\n    }\n    return $out;\n}\n<\/code><\/pre>\n\n<p>Make sure your filter returns a value of some sort, or you'll end up with no columns at all.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1<\/h4>\n\n<p>Added a settings page and code to add columns for you. No more code required!<\/p>\n\n<h4>1.0<\/h4>\n\n<p>The first release. Required you to add much of the code yourself.<\/p>","raw_excerpt":"Tested up to 3.2.1 Stable tag: trunk Add columns to the All Posts, All Pages and custom post types for any taxonomies.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/15315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=15315"}],"author":[{"embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/marcusdowning"}],"wp:attachment":[{"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=15315"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=15315"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=15315"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=15315"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=15315"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/de-at.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=15315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}