tableau et champs personnalises

This commit is contained in:
philippelin
2023-06-12 16:46:32 +02:00
parent 8e50bf8c3c
commit a4ad086903
5 changed files with 144 additions and 15 deletions
+32
View File
@@ -63,3 +63,35 @@ collect(['setup', 'filters'])
);
}
});
//ajout des champs personnalisés Minutage et Images; pour les afficher rdv dans le fichier content-single
function ajout_champs() {
add_post_meta(get_the_ID(), 'Index', true);
add_post_meta(get_the_ID(), 'Minutage', true);
add_post_meta(get_the_ID(), 'Images', true);
add_post_meta(get_the_ID(), 'BandeSon', true);
add_post_meta(get_the_ID(), 'Ecrits', true);
add_post_meta(get_the_ID(), 'VoixOffIn', true);
add_post_meta(get_the_ID(), 'isMainPart', true);
add_post_meta(get_the_ID(), 'isSubPart', true);
}
add_action('init', 'ajout_champs');
/*
function supprimer_tous_les_articles() {
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
);
$posts = get_posts($args);
foreach ($posts as $post) {
wp_delete_post($post->ID, true);
}
}
add_action('init', 'supprimer_tous_les_articles');
*/