I am using custom post type and also use jquery ui for sorting my all posts, its done but I can not save it to the database. This is my code:
$args= array(
'post_type' => 'EnvyDoc',
'orderby' => 'menu_order',
'order' => 'ASC'
);
$box_query = new WP_Query($args); ?>
<ul id="sortable">
<?php while( $box_query->have_posts() ) : $box_query->the_post(); ?>
<li id="<?php echo get_the_ID(); ?>"><?php the_title(); ?></li>
<?php endwhile; ?>
</ul>
<script>
jQuery(function() {
jQuery('.button_section_reorder_doc').mouseover(function(){
jQuery( "#section-sortable" ).sortable();
});
});
</script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…