add info footer
This commit is contained in:
parent
270ed287db
commit
192ecc579e
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Third party plugins that hijack the theme will call wp_footer() to get the footer template.
|
||||
* We use this to end our output buffer (started in header.php) and render into the view/page-plugin.twig template.
|
||||
*
|
||||
* If you're not using a plugin that requries this behavior (ones that do include Events Calendar Pro and
|
||||
* WooCommerce) you can delete this file and header.php
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Timber
|
||||
* @since Timber 0.1
|
||||
*/
|
||||
|
||||
$timberContext = $GLOBALS['timberContext']; // @codingStandardsIgnoreFile
|
||||
if ( ! isset( $timberContext ) ) {
|
||||
throw new \Exception( 'Timber context not set in footer.' );
|
||||
}
|
||||
$timberContext['content'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$templates = array( 'page-plugin.twig' );
|
||||
Timber::render( $templates, $timberContext );
|
@ -22,23 +22,28 @@ if ( file_exists( $composer_autoload ) ) {
|
||||
|
||||
if( function_exists('acf_add_options_page') ) {
|
||||
|
||||
acf_add_options_page(array(
|
||||
'page_title' => '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.
|
||||
|
@ -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 );
|
||||
|
@ -7,6 +7,7 @@
|
||||
{% endblock %}
|
||||
|
||||
<body class="{{body_class}}" data-template="base.twig">
|
||||
|
||||
<a class="skip-link screen-reader-text" href="#content">{{ _e( 'Skip to content') }}</a>
|
||||
<header class="header">
|
||||
{% block header %}
|
||||
|
@ -1 +1,2 @@
|
||||
Copyright {{"now"|date('Y')}} by FiguresLibres
|
||||
{{ dump(options) }}
|
||||
<h3>{{ site_options }}</h3>
|
||||
|
@ -1,8 +1,6 @@
|
||||
{% extends "base.twig" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{ foo }}</h2>
|
||||
<p>{{ qux }}</p>
|
||||
{% for post in posts %}
|
||||
{% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %}
|
||||
{% endfor %}
|
||||
|
@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<div class="__body">
|
||||
{{ post.meta('paragraphe_descriptif') }}
|
||||
{{ post.meta('paragraphe_descriptif') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -50,7 +50,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% include 'temcomponents/buttons/boutton_privatiser.html.twigplate'%}
|
||||
{% include 'components/buttons/boutton_privatiser.html.twig' %}
|
||||
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user