Pagination with WordPress default gallery?

Ended up like this. Made this changes and it worked: changed: ‘base’ => str_replace($big,’%#%’,esc_url(get_pagenum_link($big))), into: ‘base’ => get_permalink( $post->post_parent ) . ‘%_%’, And changed: ‘format’ => ‘?paged=%#%’, into: ‘format’ => ‘paged=%#%’, Then added a filter with rewrite tag and rule: add_filter(‘init’, ‘post_gallery_add_rewrite_tag_rule_2022’); function post_gallery_add_rewrite_tag_rule_2022() { add_rewrite_tag(‘%current%’,'([^&]+)’); add_rewrite_rule(‘([^/]+)/paged=/?([0-9]{1,})/?$’, ‘index.php?name=$matches[1]&paged=$matches[2]’, ‘top’); } Then (after uploading functions.php) in … Read more

Add additional first page, last page links to the_posts_pagination()

the_posts_pagination() is an echo wrapper for get_the_posts_pagination(). The getter generates pagination links with paginate_links(), which returns a string with the links separated by a newline character by default. This string is passed to _navigation_markup() to get the complete pagination markup. We can manipulate the paginate_links() output with paginate_links_output filter, before the navigation markup is generated. … Read more

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