Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

pre_get_posts order by title

if( $query->is_main_query() && $query->is_post_type_archive('ebooks') ) {
    $query->set( 'orderby', 'title' );
    $query->set( 'order', 'ASC' );
    $query->set( 'posts_per_page', 50 );
}
 
PREVIOUS NEXT
Tagged: #order #title
ADD COMMENT
Topic
Name
3+8 =