Support » Plugin: WP Job Manager » Pagination not working on /job-listings/, /job-category/{category-name}/

  • Resolved dnextreme88

    (@dnextreme88)


    Pagination is not working where the markup for the page /job-listings/ is displayed. My archive.php is below:

    <div id="primary" class="content-area col-lg-<?php echo intval ( $colid ); ?> col-md-<?php echo intval ( $colid ); ?> col-sm-12 <?php echo esc_attr( $layout  ); ?>" data-layout="<?php echo esc_attr( $layout  ); ?>">
        <main id="main" class="site-main">
            <div class="articlesListing blog-grid"> 
                <?php
                    if ( have_posts() ) :
                        if( !empty( $layout ) && $layout == 'masonry2-rsidebar'){
                            echo '<div class="construction-masonry">';
                        }
                            /* Start the Loop */
                            while ( have_posts() ) : the_post();
                                /* Include the Post-Type-specific template for the content.
                                 * If you want to override this in a child theme, then include a file
                                 * called content-___.php (where ___ is the Post Type name) and that will be used instead.
                                 */
    
                                // Post Display Layout
                                if( !empty( $layout ) && $layout == 'masonry2-rsidebar' ) {
                                    get_template_part( 'template-parts/content', 'masonry' );
                                } else {
                                    get_template_part( 'template-parts/content', get_post_format() );
                                }
    
                            endwhile;
    
                        if ( !empty( $layout ) && $layout == 'masonry2-rsidebar') {
                            echo '</div>';
                        }
    
                        the_posts_pagination( 
                            array(
                                'prev_text' => esc_html__( 'Prev', 'construction-light' ),
                                'next_text' => esc_html__( 'Next', 'construction-light' ),
                            )
                        );
    
                    else :
                        get_template_part( 'template-parts/content', 'none' );
                    endif;
                ?>
            </div><!-- Articles Listings -->
        </main><!-- #main -->
    </div><!-- #primary -->

    Pagination on search, job dashboard works perfectly but it doesn’t work on other pages such as /job-listings/ or /job-categories/ or /job-types.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.