So after checking
only the “page” and “post” types have this problem. All the fields registered in custom-post.php do not have this problem.
I’ve tried a few codes and I saw that the old dev had also tried… but it doesn’t work. For example
public function add_category_to_pages() {
register_taxonomy_for_object_type('post_tag', 'page');
// Add category metabox to page
register_taxonomy_for_object_type('category', 'page');
}
function add_taxonomies_to_post_and_page() {
global $wp_post_types
if (post_type_exists('post')) {
// Récupérer l'objet existant
$post_obj = $wp_post_types['post'];
if (!in_array('post_tag', $post_obj->taxonomies)) {
$post_obj->taxonomies[] = 'post_tag';
}
if (!in_array('category', $post_obj->taxonomies)) {
$post_obj->taxonomies[] = 'category';
}
}
if (post_type_exists('page')) {
$page_obj = $wp_post_types['page'];
if (!in_array('post_tag', $page_obj->taxonomies)) {
$page_obj->taxonomies[] = 'post_tag';
}
if (!in_array('category', $page_obj->taxonomies)) {
$page_obj->taxonomies[] = 'category';
}
}}add_action('init', 'add_taxonomies_to_post_and_page', 20);
function ajouter_categories_et_tags_a_tous_les_types() {
$post_types = get_post_types(array('public' => true), 'names');
foreach ($post_types as $post_type) {
register_taxonomy_for_object_type('category', $post_type);
register_taxonomy_for_object_type('post_tag', $post_type);
}
}
add_action('init', 'ajouter_categories_et_tags_a_tous_les_types');
Elsewhere, I saw someone talking about “wp super cache”, I’ve installed it, I’ve cleared the cache but it doesn’t work… they’re also talking about restarting the server, but I can’t get hold of that, it’ll be restarted tonight. We’ll see tomorrow if this solution is ok, but I doubt about it. ^^