From d1c3b69bc0d14b0da8a3a417fd607c7e4bd2e283 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 17 Apr 2024 10:24:29 +0200 Subject: [PATCH] introducing parcours hiercarchy and post type --- includes/post_types.php | 2 +- single-parcours-child.php | 18 +++++++++++++++++ single-parcours-parent.php | 33 ++++++++++++++++++++++++++++++++ single-parcours.php | 26 ++++++------------------- template-parcours-renovateur.php | 11 ++++++++--- 5 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 single-parcours-child.php create mode 100644 single-parcours-parent.php diff --git a/includes/post_types.php b/includes/post_types.php index e60f3b8..7538d71 100644 --- a/includes/post_types.php +++ b/includes/post_types.php @@ -193,7 +193,7 @@ function create_posttype() 'show_in_rest' => true, 'menu_icon' => 'dashicons-forms', 'supports' => array('title', 'custom-fields'), - 'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revision'), + 'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revision', 'excerpt'), ) ); diff --git a/single-parcours-child.php b/single-parcours-child.php new file mode 100644 index 0000000..aa0eca5 --- /dev/null +++ b/single-parcours-child.php @@ -0,0 +1,18 @@ + + + + +
"> + + + +
+ + + + + + + + +
"> +

parent

+ + + +
+ + + + + + +$isParentPage = get_queried_object()->post_parent === 0; - - slug); - ?> - -
"> - -
- - - - - posts as $parcoursStep) : ?> -
+
'parcours', @@ -63,9 +63,14 @@ $parcoursSteps = new WP_Query(array( 'post_parent' => $parcoursStep->ID, )); ?> -

post_title ?>

+

post_title ?> +

-

post_title ?>

+

+ + post_title ?> + +