100, // тоже самое что posts_per_page 'offset' => 0, 'category' => '', 'orderby' => 'post_date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'portfolio_pages', 'post_mime_type' => '', // image, video, video/mp4 'post_parent' => '', 'post_status' => 'publish' ) ); /* $script = " "; */ $args = array( 'orderby' => 'id', 'order' => 'ASC', 'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(), 'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '', 'hierarchical' => true, 'child_of' => 0, 'get' => '', // ставим all чтобы получить все термины 'name__like' => '', 'pad_counts' => false, 'offset' => '', 'search' => '', 'cache_domain' => 'core', 'name' => '', // str/arr поле name для получения термина по нему. C 4.2. 'childless' => false, // true не получит (пропустит) термины у которых есть дочерние термины. C 4.2. ); $myterms = get_terms( array( 'portfolio_category' ), $args ); // $myterms = get_terms( 'post_tag', $args ); foreach( $myterms as $term ){ $list_filter .= '
  • '.$term->name.'
  • '; } $script = " "; foreach($posts as $post){ //$output .= $post->ID.'+'; $cur_terms = get_the_terms( $post->ID, 'portfolio_category' ); $taxxx = 'All '; if (is_array($cur_terms) || is_object($cur_terms)) { foreach($cur_terms as $cur_term){ $taxxx .= str_replace(' ', '_', $cur_term->name).' '; } } $image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' ); $background_preloader = 'style="background-image:url('. $image_attributes[0] .')"'; $output .= '
  • '.$post->post_title.'

    '.get_post_meta($post->ID, '_portfolio_abc_customer', true).'

  • '; } return $script.'

    Welcome to Our Portfolio

    '.$content.'

    prev
    1
    next
    '; } add_myshortcode2( 'portfolio_abc', 'portfolio_abc' ); ?>