diff --git a/functions.php b/functions.php index 9b1b0c0..f0e2cf0 100644 --- a/functions.php +++ b/functions.php @@ -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'); +*/ diff --git a/package.json b/package.json index 0a105be..565a2be 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,6 @@ "@roots/sage": "6.12.2" }, "dependencies": { - "caniuse-lite": "^1.0.30001487" + "caniuse-lite": "^1.0.30001488" } } diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index c52e1cf..b63f4b4 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -1,7 +1,58 @@ @extends('layouts.app') @section('content') - @include('partials.page-header') + + + +
| + | Images | +Voix Off et In | +Bande Son | +Ecrits | +
|---|---|---|---|---|
| {{ get_post_meta(get_the_ID(), 'Minutage', true) }} | +{{ get_post_meta(get_the_ID(), 'Images', true) }} | +{{ get_post_meta(get_the_ID(), 'VoixOffIn', true) }} | +{{ get_post_meta(get_the_ID(), 'BandeSon', true) }} | +{{ get_post_meta(get_the_ID(), 'Ecrits', true) }} | +
| {{ $champ['titre'] }} | +{{ $champ['contenu'] }} | +
|---|