Reusable Custom Blocks

Custom Post Type with Custom Filter

Requirements: Copy and paste this code into the custom block. You may modify it as needed to meet the client’s requirements. <?php /* Block Name: Custom Resources */ $args = array( ‘post_type’ => ‘resources_post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘order’ => ‘ASC’, ); $categories = get_categories(); $used_categories = array(); ?> <div class=”category-filter”> <?php foreach […]