query problem for display with pagination

I developed a wordpress page template (which is supposed to display digital products that I sell on my site) that worked without problems for months, but since yesterday, the page template doesn’t show anything, not even the login bar of the site, I don’t understand why, the problem most certainly comes from the request, can you help me? Thank you for your answers

here is my code:

<?php // Template Name: edition ?>

<?php get_header(); ?>

<div id=”cultura” class=”cf”>

<div class=”avrbreadcrumb2″>
echo get_hansel_and_gretel_breadcrumbs();

if (get_query_var(‘paged’)) {
$paged = get_query_var(‘paged’);
} elseif (get_query_var(‘page’)) { // ‘page’ is used instead of ‘paged’ on Static Front Page
$paged = get_query_var(‘page’);
} else {
$paged = 1;
$args = array(
‘post_type’ => ‘edition_newstrotteur’,
‘numberposts’ => -1,
‘post_status’ => null,
‘post_parent’ => null,
‘posts_per_page’ => 9,
‘paged’ => $paged //very important

// The Loop
$custom_query = new WP_Query($args);
if ($custom_query->have_posts()) : ?>

<nav class=”herdewebnav2″>
<?php echo pagination($custom_query->max_num_pages); ?>
while ($custom_query->have_posts()) : $custom_query->the_post();

<li class=”grid-item2″>
<div class=”classlecture”>
<?php the_post_thumbnail(‘large’); ?>
<div class=”globalfields”>

<a href=”<?php echo get_permalink($post->ID);?>” >
<?php echo wp_trim_words( get_the_title(), 10 ); ?>

<div class=”deletereadmore”>
<p class=”paranews”>
<?php echo substr(get_the_excerpt(), 0, 85); ?>…
<div class=”globalamz”>
<div class=”flexamz”>
<a class=”read-more3″ href=”<?php the_permalink(); ?>” >
Lire plus
<strong class=”read-more3″>
<?php echo get_post_meta($post->ID, ‘link_amz’, true);?>

<?php endwhile; ?>

<nav class=”herdewebnav2″>
<?php if (function_exists(“pagination”)) {
} ?>

<?php endif;



<?php get_footer(); ?>

Read more here:: query problem for display with pagination

Leave a Reply

Your email address will not be published. Required fields are marked *