WP Sort Order Pro

$35.00

Category:

Description

WP Sort Order Pro

Features:

  • Default Custom Taxonomy “User Categories”
  • A shortcode to list users under taxonomy, terms and children. [WPSO_USERS slug=”taxonomy or term slug” id=”taxonomy or term id”]

Compatible with visual editors:

A sample of jQuery snippet to link object items with DOM.

<script type="text/javascript" language="javascript">
jQuery(document).ready(function($){
$.each($('.mh-agent-list > .mh-agent-list__element'), function(){
var url = $(this).find('.mh-agent__thumbnail').attr('href');
$(this).attr('data-url', url).addClass('ts-items');
});
var sid = 0;
$.each(wpso.user_items[798], function(i, v){
sid++;
$('div.ts-items[data-url="'+v.user_link+'"]').attr('data-sid', sid);
});
			var items = $('.ts-items');
			items.sort(function(a, b){
					var al = parseInt($(a).data('sid'));
					var be = parseInt($(b).data('sid'));
			
					if(isNaN(al))
					al=0; 
			
					if(isNaN(be))
					be=0; 
					
					return (al-be);
					
			});				
			items.appendTo('.mh-agent-list');
});
</script>