Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes I need that too and I see no one answered this question. My authors new book is on the 2nd page and I need to have more control over how the books show on the all books page.
    Thanks.

    Thread Starter Susan Hayse

    (@suhayse)

    Linda, I ended up adding the following to my functions.php file within the Author Pro theme files and it worked. I found it here, I think (https://wordpress.stackexchange.com/questions/39817/sort-results-by-name-asc-order-on-archive-php)

    //*Change sort order on books archive
    add_action( 'pre_get_posts', 'my_change_sort_order');
        function my_change_sort_order($query){
            if(is_archive()):
             //If you wanted it for the archive of a custom post type use: is_post_type_archive( $post_type )
               //Set the order ASC or DESC
               $query->set( 'order', 'ASC' );
               //Set the orderby
               $query->set( 'orderby', 'title' );
            endif;
        };
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Book Archive in Title Order’ is closed to new replies.