'Tutorial' sorting custom post types (listings) by alpha order

Hi guys, I am a bit wary of calling this a tutorial as I am far from an expert (there may be a much easier way of doing it for example!) but it worked for me and maybe someone else will find it useful

How to display the listings in alpha order (instead of most recently posted)

Go to:

/wp-content/plugins/directory/themes/default/includes/functions

Open loop-functions.php

Find the line that says global $wp_query (about line 34)

immediately after it, add:

query_posts(
	array_merge(
		$wp_query->query,
		array(
		'order' => 'ASC',
		'orderby'=>'title',
		'posts_per_page' => 20,
		)
	)
);

Save / re-upload and voila

Cheers

Nick

You may also find this useful...

How to hide other Directory Members posts on the admin pages
https://premium.wpmudev.org/forums/topic/solved-how-to-hide-other-directory-members-posts-on-the-admin-pages