ID, 'business-center-pro-portfolio-template', true ); if( empty( $categories_id ) ) : ?>
  • $category_id ) { $category_object = get_category( $category_id ); echo '
  • '. esc_html( $category_object->name ) .'
  • '; } ?>
$categories_id, 'posts_per_page' => absint( get_option( 'posts_per_page', 7 ) ), // Maximum number of posts to show on a page; set in Reading Options.,, ); $portfolio_posts = get_posts( $portfolio_args ); if( !empty( $portfolio_posts ) ) : $index = 1; foreach ( $portfolio_posts as $key => $portfolio_post ) { if( ( $index % 7 == 3 ) || ( $index % 7 == 0 ) ) { $item = 2; } else{ $item = 1; } $portfolio_post_id = $portfolio_post->ID; if ( has_post_thumbnail( $portfolio_post_id ) ) { $featured_img = wp_get_attachment_image_src( get_post_thumbnail_id( $portfolio_post->ID ), 'large' ); $img_array = $featured_img[0]; } else { $img_array = get_template_directory_uri() . '/assets/uploads/no-featured-image-1300x600.jpg'; } if ( isset( $img_array ) ) { $post_image['img_array'][0] = $img_array; } $post_title = get_the_title( $portfolio_post_id ); $post_url = get_the_permalink( $portfolio_post_id ); $post_categories = get_the_category( $portfolio_post_id ); $post_category_list = ''; $post_category_name = ''; foreach ( $post_categories as $key => $post_category ) { $post_category_name .= $post_category->name . ' '; $post_category_list .= $post_category->slug . ' '; } ?>