PHP code example of trendwerk / post-type-order

1. Go to this page and download the library: Download trendwerk/post-type-order library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

trendwerk / post-type-order example snippets


'supports'          => array( 'title', 'editor', 'revisions', 'order' ),
'order_by_taxonomy' => $taxonomy

$posts = new WP_Query( array(
	'post_type' => $post_type,
	'post__in'  => TP_Post_Type_Order::get_posts( $term, $taxonomy, $post_type ),
	'orderby'   => 'post__in'
) );