Hi, I SOLVED the problem !!!! :D:D:D:D:D:D
I think is a problem with WP v3.0, I modify 2 lines in the file “custom-file-template.php”
I don’t now if this modifications are the best solution for the problem but it works for me.
1 – In function “load_custom_field( $id = 0 )”
Original code (line 1997 aprox):
if ( $options['custom_fields'][$id]['post_type'] ) :
if ( substr($wp_version, 0, 3) < '3.0' ) :
if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
return;
endif;
if ( $options['custom_fields'][$id]['post_type'] == 'page' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php')) ) :
return;
endif;
else :
if ( $_REQUEST['post_type']!=$options['custom_fields'][$id]['post_type'] && $post->post_type!=$options['custom_fields'][$id]['post_type'] ) :
return;
endif;
endif;
endif;
Modified code:
if ( $options['custom_fields'][$id]['post_type'] ) :
if ( substr($wp_version, 0, 3) < '3.0' ) :
if ( $options['custom_fields'][$id]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
return;
endif;
if ( $options['custom_fields'][$id]['post_type'] == 'page' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php')) ) :
return;
endif;
else :
/*---------------------------> MODIFICIO AQUI*/
if ( $_REQUEST['post_type']!=$options['custom_fields'][$id]['post_type'] && $post->post_type!=$options['custom_fields'][$id]['post_type'] && !($options['custom_fields'][$id]['custom_post_type'])) :
return;
endif;
endif;
endif;
2 – In funcion “custom_field_template_filter()”:
Original code (line 2428 aprox):
else :
if ( $post->post_type!=$options['custom_fields'][$i]['post_type'] ) :
continue;
endif;
endif;
Modified code:
else :
/** ----------------------------------> MODIFICADO ESTO PARA QUE APAREZCA EL COMBO EN LOS TIPOS PERSONALIZADOS DE POSTS **/
if (( $post->post_type!=$options['custom_fields'][$i]['post_type'] )&&( !( $options['custom_fields'][$i]['custom_post_type'] ))) :
continue;
endif;
endif;
I hope this help you too,