Custom pagination in wp

You will need to use paginate_links (https://codex.wordpress.org/Function_Reference/paginate_links) to output pagination. You’ll need some additional CSS to style the links however.

how to Adding pagination on template page wordpress

get_template_part( ‘template-parts/pagination’, ” ); is merely including the template-parts/pagination.php file from your theme. If you don’t have that file then nothing will happen. The correct way to add pagination is either the paginate_links() function, which will output links for each page number (see that link for the options for customising the output): <?php echo paginate_links(); … Read more

why pagination not working in page template

Because you override global WP_Query with your own query_posts and you ignore page in there – all you set is showposts (which is deprecated and from wp 2.1 you should use posts_per_page instead). But to be honest, you shouldn’t use query_posts either (especially in this case). So how to do this? Use pre_get_posts filter to … Read more

Override the WordPress default pagination markup

do you mean post archive pagination? The paginate_links() function accepts a type parameter, so if all you need is a ul > li format you could try out something like: // archive pagination global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( [ ‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)