display a random post thumbnail from a random category

All you need to do is to add another query in your code: function categorie_shortcode_callback() { $html=””; $categories = get_categories( array( // ‘type’ => ‘carte’, <- THERE IS NO ATTRIBUTE CALLED type FOR get_categories, SO REMOVE THAT ‘taxonomy’ => ‘carte-category’, ‘parent’ => 0 )); shuffle( $categories); // you also don’t need to loop through that … Read more

Posts will not display on page-mypage.php

You can use custom query to show post in your template $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); the_content(); endwhile;

Category Page Template not Showing Posts

You should never create your own custom WP_Query queries on category templates (or any other archive template) and use them as main loop. Why? Because it will break pagination. WordPress will still create all pagination links for such archives based on default query. So if you want to modify the query in such way, that … Read more

CPT archive redirects to single post

The URL of your archive is https://inthebunch.co.za/livestreams/. Have a look at the docs for register_post_type, specifically, the description for the has_archive argument: has_archive (boolean or string) (optional) Enables post type archives. Will use $post_type as archive slug by default. Default: false In the case of your code, $post_type is livestreams: register_post_type( “livestreams”, $args ); If … Read more