WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Normal and Custom Post Type Columns the same (3 posts)

  1. joshrodgers
    Member
    Posted 1 year ago #

    I have a piece of code that display columns for my custom post type "slides". Basically the custom post type mirrors the columns that you see in the normal post column window, plus it includes an additional "thumbnail" column. What I would like to do is extend the thumbnail capability to a normal post column.

    The code I am using looks like: http://pastebin.com/n7bZn2Nd

    For the first function I added the following after the add_filter: add_filter('manage_posts_columns', 'custom_columns');

    which worked great! Then I tried the second function...I added another action after add_action, which looks like: add_action('manage_posts_custom_column', 'image_column1', 10, 2);

    However, this time it didn't work...I get two images showing up for my custom post type and no images for the normal post.

    Any ideas?
    Thanks, Josh

  2. joshrodgers
    Member
    Posted 1 year ago #

    Oops...made a typo...image_column1 is just image_column, there is no one...

    sorry :(

    Josh

  3. joshrodgers
    Member
    Posted 1 year ago #

    What I didn't realize was that I didn't need multiple filters or actions, because they are both posts, I can use the same code for both my normal posts and my custom post type posts.

    Here is my final code: http://pastebin.com/w1jqVCYs :)

    Thanks,
    Josh

Topic Closed

This topic has been closed to new replies.

About this Topic