diff --git a/web/app/themes/la_mine/footer.php b/web/app/themes/la_mine/footer.php deleted file mode 100644 index c00e7495..00000000 --- a/web/app/themes/la_mine/footer.php +++ /dev/null @@ -1,21 +0,0 @@ - 'Information', - 'menu_title' => 'Information', - 'icon_url' => 'dashicons-buddicons-activity', - 'capability' => 'edit_posts', - 'redirect' => false - )); + acf_add_options_page(array( + 'page_title' => 'Information', + 'menu_title' => 'Information', + 'menu_slug' => 'information', + 'capability' => 'edit_posts', + 'redirect' => false + )); + + acf_add_options_sub_page(array( + 'page_title' => 'Partenaires', + 'menu_title' => 'Partenaires', + 'parent_slug' => 'information', + )); - acf_add_options_page(array( - 'page_title' => 'Partenaires', - 'menu_title' => 'Partenaires', - 'icon_url' => 'dashicons-buddicons-activity', - 'capability' => 'edit_posts', - 'redirect' => false - )); } +add_filter( 'timber_context', 'options_footer' ); + +function options_footer( $context ) { + $context['options'] = get_fields('option'); + return $context; +} /** * This ensures that Timber is loaded and available as a PHP class. diff --git a/web/app/themes/la_mine/index.php b/web/app/themes/la_mine/index.php index 804e5556..36c73b8e 100755 --- a/web/app/themes/la_mine/index.php +++ b/web/app/themes/la_mine/index.php @@ -15,9 +15,9 @@ $context = Timber::context(); $context['posts'] = new Timber\PostQuery(); -$context['foo'] = 'bar'; -$templates = array( 'index.twig' ); + +$templates = array( 'base.twig' ); if ( is_home() ) { - array_unshift( $templates, 'front-page.twig', 'home.twig' ); + array_unshift( $templates, 'front-page.twig', 'accueil.twig' ); } Timber::render( $templates, $context ); diff --git a/web/app/themes/la_mine/templates/base.twig b/web/app/themes/la_mine/templates/base.twig index 8dbefbcc..94c77003 100644 --- a/web/app/themes/la_mine/templates/base.twig +++ b/web/app/themes/la_mine/templates/base.twig @@ -7,6 +7,7 @@ {% endblock %}
+ {{ _e( 'Skip to content') }}{{ qux }}
{% for post in posts %} {% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %} {% endfor %} - + {% include 'partial/pagination.twig' with { pagination: posts.pagination({show_all: false, mid_size: 3, end_size: 2}) } %} {% endblock %} diff --git a/web/app/themes/la_mine/templates/page-plugin.twig b/web/app/themes/la_mine/templates/page-plugin.twig index 712785da..30c15354 100644 --- a/web/app/themes/la_mine/templates/page-plugin.twig +++ b/web/app/themes/la_mine/templates/page-plugin.twig @@ -4,4 +4,4 @@