Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array(
- 'posts_per_page' => -1,
- 'post_type' => 'products',
- 'post_status' => 'publish',
- 'tax_query' => array(
- 'relation' => 'AND',
- array(
- 'taxonomy' => 'subjects',
- 'field' => 'name',
- 'terms' => $shortcode_atts['subject'],
- ),
- array(
- 'taxonomy' => 'plans',
- 'field' => 'name',
- 'terms' => $shortcode_atts['plan'],
- ),
- ),
- );
- $products = get_posts( $args );
- echo '<pre dir="ltr">';var_dump($args);echo '</pre>';
- echo '<pre dir="ltr">';var_dump($shortcode_atts);echo '</pre>';
- echo '<pre dir="ltr">';var_dump($products);echo '</pre>';
- string(550) "Array
- (
- [posts_per_page] => -1
- [post_type] => products
- [post_status] => publish
- [tax_query] => Array
- (
- [relation] => AND
- [0] => Array
- (
- [taxonomy] => subjects
- [field] => name
- [terms] => אינטרנט
- )
- [1] => Array
- (
- [taxonomy] => plans
- [field] => name
- [terms] => מסלול 10 גיגה
- )
- )
- )
- "
- string(80) "Array
- (
- [subject] => אינטרנט
- [plan] => מסלול 10 גיגה
- )
- "
- string(3269) "Array
- (
- [0] => WP_Post Object
- (
- [ID] => 284
- [post_author] => 1
- [post_date] => 2018-07-02 14:41:46
- [post_date_gmt] => 2018-07-02 11:41:46
- [post_content] =>
- [post_title] => מסלול 40 גיגה - וואלה מובייל
- [post_excerpt] =>
- [post_status] => publish
- [comment_status] => open
- [ping_status] => closed
- [post_password] =>
- [post_name] => someurl
- [to_ping] =>
- [pinged] =>
- [post_modified] => 2018-07-02 14:42:58
- [post_modified_gmt] => 2018-07-02 11:42:58
- [post_content_filtered] =>
- [post_parent] => 0
- [guid] => someurl
- [menu_order] => 0
- [post_type] => products
- [post_mime_type] =>
- [comment_count] => 0
- [filter] => raw
- )
- [1] => WP_Post Object
- (
- [ID] => 216
- [post_author] => 1
- [post_date] => 2018-07-01 11:03:02
- [post_date_gmt] => 2018-07-01 08:03:02
- [post_content] =>
- [post_title] => מסלול 10 גיגה - וואלה מובייל
- [post_excerpt] =>
- [post_status] => publish
- [comment_status] => open
- [ping_status] => closed
- [post_password] =>
- [post_name] => someurl
- [to_ping] =>
- [pinged] =>
- [post_modified] => 2018-07-02 09:22:24
- [post_modified_gmt] => 2018-07-02 06:22:24
- [post_content_filtered] =>
- [post_parent] => 0
- [guid] => someurl
- [menu_order] => 0
- [post_type] => products
- [post_mime_type] =>
- [comment_count] => 0
- [filter] => raw
- )
- [2] => WP_Post Object
- (
- [ID] => 60
- [post_author] => 1
- [post_date] => 2018-06-25 11:34:43
- [post_date_gmt] => 2018-06-25 08:34:43
- [post_content] =>
- [post_title] => מסלול 10 גיגה - פלאפון
- [post_excerpt] =>
- [post_status] => publish
- [comment_status] => open
- [ping_status] => closed
- [post_password] =>
- [post_name] => someurl
- [to_ping] =>
- [pinged] =>
- [post_modified] => 2018-07-02 09:22:33
- [post_modified_gmt] => 2018-07-02 06:22:33
- [post_content_filtered] =>
- [post_parent] => 0
- [guid] => someurl
- [menu_order] => 0
- [post_type] => products
- [post_mime_type] =>
- [comment_count] => 0
- [filter] => raw
- )
- )
- "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement