Page-Links Plus affiliates and resellers

Page-Links Plus

#pagelinksplus

A WordPress pagination plugin that helps users paginate content easily & efficiently.

Can anyone help me fixing this code ?

Home Forums Stories Can anyone help me fixing this code ?

This topic contains 0 replies, has 1 voice, and was last updated by  Alexander 1 week, 2 days ago.

  • Author
    Posts
  • #734 Reply

    Alexander

    I have use that code but still i am having some issues as it is not working properly or might be i am doing something wrong. Can anyone guide me on this as i have found this code on https://www.wpblog.com/use-wp_query-to-create-pagination/

    <?php
    get_header(); ?>
     
    <?php
    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    $args = array(
      'posts_per_page' => 4,
      'paged' => $paged
    );
    $custom_query = new WP_Query( $args );
    ?>
              <!----start-------->
    <div class="wrap">
    <div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">
     
    <?php
       while($custom_query->have_posts()) :
          $custom_query->the_post();
    ?>
           <div>
            <ul>
             <li>
               <h3><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h3>
            <div>
              <ul>
            <div><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a></div>
              </ul>
              <ul>
            <p><?php echo the_content(); ?></p>
              </ul>
            </div>
            <div>
              </li>
            </ul>
              </div> <!-- end blog posts -->
           <?php endwhile; ?>
          <?php if (function_exists("pagination")) {
              pagination($custom_query->max_num_pages);
          } ?>
    </main><!-- #main -->
    </div><!-- #primary -->
    </div><!-- .wrap -->
              <!----end-------->
    <?php get_footer();
Reply To: Can anyone help me fixing this code ?
Your information:




Get PLP

$10

Page-Links Plus helps WordPress developers, site managers, and lay users paginate content easily & efficiently. Buy now »
back to top