I want to add pagination to this page: / Can anyone explain why neither of these codes works?
The theme developer added this code, which made the page endlessly buffer.
if ( $total_page > 1 ) {
ht_movie_pagination($total_page);
}
In other pages, the theme developer used this code (which works on other pages), which results in syntax error of unexpected /
<!-- Pagination -->
<div class="row">
<?php
if ( $movie->max_num_pages > 1 ) :
?>
<nav class="movie-pagination">
<div class="pagination-left">
<span><?php echo esc_html__( 'Movie per page: ', 'blockter' ); ?></span>
<span><?php echo esc_html__( '8 movies', 'blockter' ); ?></span>
</div>
<div class="pagination-right">
<div class="page-text">
<span><?php echo esc_html__( 'Page', 'blockter' ); ?></span>
<span><?php echo esc_html( $paged ); ?></span>
<span><?php echo esc_html__( 'of', 'blockter' ); ?></span>
<span><?php echo esc_html( $movie->max_num_pages ); ?></span>
<span><?php echo esc_html__( ':', 'blockter' ); ?></span>
</div>
<?php
echo paginate_links(
array(
'base' => str_replace( 999999999, '%#%', get_pagenum_link( 999999999 ) ),
'format' => '',
'current' => $paged,
'total' => $movie->max_num_pages,
'prev_text' => ' ',
'next_text' => ' ',
'type' => 'list',
)
);
?>