Ready to get started?Download WordPress


How to add colums to the screen layout of custom post type ? (5 posts)

  1. Franky57
    Posted 1 year ago #

    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 ?


  2. catacaustic
    very awesome
    Posted 1 year ago #

    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!

  3. Franky57
    Posted 1 year ago #

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

  4. catacaustic
    very awesome
    Posted 1 year ago #

    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.

  5. bcworkz
    Posted 1 year ago #

    To add columns to the custom post type table on the admin screen, refer to these pages:

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic