Increase number of posts in archive page

You can use pre_get_posts in your functions file to alter the query function wpsites_query( $query ) { if ( $query->is_archive() && $query->is_main_query() && !is_admin() ) { $query->set( ‘posts_per_page’, 100 ); } } add_action( ‘pre_get_posts’, ‘wpsites_query’ );

Default archive URL wordpress

This may be an old question, but all the answers here are incorrect. If the front page is set to a static page, and another page is set to the blog page, this will dynamically fetch and echo the URL for the blog archive page (i.e. blog index page)… <?php echo get_permalink( get_option( ‘page_for_posts’ ) … Read more

Sort results by name & asc order on Archive.php

The easiest way to do this is to use a hook (the pre_get_posts hook) to change the order. But you should check that the query is one for which you do want to alter the order! (is_archive() or is_post_type_archive() should be sufficient.) For instance, put the following in your theme’s functions.php… add_action( ‘pre_get_posts’, ‘my_change_sort_order’); function … Read more