I tried to uninstall all the plugins one by one. Apparently, the problem does not come from another plugin.
I think the problem comes from the theme itself.
I also noticed that the template "html-header.twig" contained meta fields for the title and the description. However, when an SEO plugin is activated, these metas remain in the source code. What creates a duplicate ...
Also, after installing the debug bar, I do not see any errors. The situation is very strange. Because once a description of the page is introduced in the SEO plugin, Twig queries are empty ...
I do not know if there is an error in my twig queries. Here they are:
Page digital.php
<?php
$context = Timber::get_context();
$args = array(
// Get post type project
'post_type' => 'project',
// Get all posts
'posts_per_page' => -1,
// Gest post by "digital" category
'meta_query' => array(
array(
'key' => 'project_category',
'value' => 'digital',
'compare' => 'LIKE'
)
),
// Order by post date
'orderby' => array(
'date' => 'DESC'
),
);
$context['digitals'] = Timber::get_posts( $args );
Timber::render( 'page-digital.twig', $context );
Page digital.twig
{% for post in digitals %}
{% if post.thumbnail %}
<a href="{{post.link}}" class="l-basicgrid-work work">
<article>
<figure>
<img data-src="{{post.get_thumbnail.src('medium_large')|resize(800, 533)}}" alt="{{post.title}}" class="lazy">
</figure>
<figcaption>
<h2>{{ post.title }}</h2>
</figcaption>
</article>
</a>
{% endif %}
{% endfor %}
Did I do something wrong?