Viewing 11 replies - 1 through 11 (of 11 total)
  • What about using the register_meta_box_cb argument with register_post_type()?

    Don’t know how well it works but here’s one example:
    http://bit.ly/bRjAzS

    or this:
    http://bit.ly/cG59rT

    Thread Starter David Sword

    (@davidsword)

    Thank you for the link – that artical provided a lot of insite.

    After 2 solid days of research & trial+error, I found all I had to do was add:

    // add custom meta to custom post type 'portfolio'
    	add_meta_box( 'attachments_list', __( 'Attachments', 'attachments_textdomain' ), 'attachments_add', 'portfolio', 'normal' );

    to the attachment where it declares it for ‘posts’ and ‘pages’.

    🙂

    hello david.

    could be explained as you did?

    I’m trying and I could not …

    I thank you infinitely.

    Thread Starter David Sword

    (@davidsword)

    to my understanding,

    for meta boxes to be added to the “post” or “page” Write screens, authors of the plugins need to use “add_meta_box(” to declare it in the different post types with the 4th argument “$page” of add_meta_box .. soo if you have a new custom post type, ie: ‘portfolio’, you have to add that you want the meta box to be on the ‘Portfolio’ write screen with “add_meta_box()” — just as it should be already with ‘post’ andor ‘page’

    so all i did was search the desired plugins source for “add_meta_box(” and added the previous code beneath the two already there to put the meta box in ‘posts’ and ‘pages’

    sweet. this worked perfectly for me. thanks.

    Great fix. I could get Microkid’s Related Posts to now appear in my custom-post Portfolio edit page. However I need it to search for portfolio custom-post items instead of regular posts as well. Do you think that’s only another tweak as well?

    http://wordpress.org/extend/plugins/microkids-related-posts/

    I wrote a step by step guide for adding metaboxes to custom post types. Perhaps it’ll be helpful: http://wptheming.com/2010/08/custom-metabox-for-post-type/

    Alain

    (@alainotjens)

    thanks david! that saved me two solid days…

    David… THANK YOU! this was exactly what I was looking for 😀

    And Devin- thank you too!!! i feel like I won the lottery after landing on this page 🙂

    Hey everyone, just wanted to make it known that Attachments has supported additional content types for some time now, under Settings there is an area for Attachments and you can pick/choose which CPT you’d like to use.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Adding plugins meta box’s to custom post types’ is closed to new replies.