How to change the order of services in services typ B widget?


I want to change the order of the services in the services widget typ B. Currently they are ordered by date of publishing. Hence, the service I added at last is displayed at first position in the frontend.

Can I change the order manually?

There does not seem to be a simple way. I currently added some code in the theme to order by page_title, but that is a hack only, as the next update will remove my changes and I will have to apply them again. Also this does not give you a custom order. That would involve even more changes in the code that I would need to keep updated on my site manually.

Basically I edited \wp-content\themes\sydney-pro-ii\widgets\fp-services-type-a.php and type-b.php and added two lines of code to sort by post_title.

	$services = new WP_Query( array(
		'no_found_rows'       => true,
		'post_status'         => 'publish',
		'post_type' 		  => 'services',
		'posts_per_page'	  => $number,
		'category_name'		  => $category	
		<strong>// RGO ADD 2017-05-05 - sort by post-title, not by date
		,'orderby'			  =&gt; 'post_title'
		,'order' =&gt; 'ASC'</strong>

Hello Alexander and Martin,

You can try to use Post Types Order plugin.

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.