Problem solved.
Here is what I did:
- I Thought: the only custom post type that is showed correctly on back-end is the cpt “Informazione”. So maybe the problem is here
- I’ve disabled this custom post type and effectively everything come back to work as aspected
- Searching on the web I found that other users had the same problem. They solved adding a wp_reset_query() somewhere in their code. Me also I’ve tryed this solution before posting here, but without success. The difference was that now I knew that some query around the “Informazione” cpt was causing the problem
- I’ve disabled some block of codes until I’ve found the problem:
functions.php
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query )
{
if($query->get("page_id") == get_option("page_on_front"))
{
$query->set("post_type", "informazione");
$query->set("posts_per_page", -1);
return $query;
}
}
I was using this code in order to see in home page an “Informazione” post. I removed it and everything worked again.