Support » Plugins » Hacks » How to add colums to the screen layout of custom post type ?

  • Hi !

    I would like to add a third or fourth column to the screen layout of my custom post type but without using a plugin or modify WordPress core code.

    Is somebody know the way to achieve this ?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • catacaustic

    (@catacaustic)

    very awesome

    You can modify the layout of your custom post type by creating/editing the template file for that post type.

    as an example, if your post type is called ‘products’, you’d use a file called single-products.php. If that file doesn’t exist you can copy it from single.php in your theme – but be sure to use a child theme so your changes don’t get lost on any future updates!

    Sorry, I omitted to specify I would do this of my custom post type edit panel in the wordpress admin screens.

    catacaustic

    (@catacaustic)

    very awesome

    OK then, that may make it a lot harder. Unless you have a template file that is directly made for that content type (single-products.php, content-products.php, etc…) then you can’t do it through the built-in theme editor. That editor doesn’t create files, it only lets you edit files that are already there.

    Moderator bcworkz

    (@bcworkz)

    To add columns to the custom post type table on the admin screen, refer to these pages:
    http://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column
    http://codex.wordpress.org/Plugin_API/Filter_Reference/manage_edit-post_type_columns

    While doing so is typically done with a plugin, I believe it can be done by adding code to your theme’s functions.php, though you are better off creating a child theme to contain and protect your custom code.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add colums to the screen layout of custom post type ?’ is closed to new replies.