Custom Post Type has wrong label and is not found when called by a loop

The issue with the labels in problem 1 is that you haven’t passed the labels to register_post_type(). You’ve defined the labels in the $labels variable, but this is what you passed to register_post_type(): $args = array( ‘labels’ => ‘Bateau’, // … ); register_post_type( ‘bateau’, $args ); You need to pass the $labels array: $args = … Read more

fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term

So you first want to order them by author and then by date for every author? You should use the orderby argument in your query, where you can pass an array. $custom_query_args = array( ‘post_type’ => ‘post’, ‘meta_key’ => ‘xyz’, ‘meta_value’ => ‘yes’, ‘orderby’ => array( ‘author’ => ‘ASC’, ‘date’ => ‘DESC’ ) ); This … Read more