0
votes

i am new to wordpress. i pass customized argument to WP_Query Function. Its Return Invalid Result. I limit Products per page 10 but it show all products.

$args - Print Result

Array ( [post_type] => product [posts_per_page] => 10 [post_status] => publish [paged] => 1 [orderby] => [order] => [meta_query] => Array ( [0] => Array ( ) ) [tax_query] => Array ( [0] => Array ( [taxonomy] => product_cat [field] => slug [terms] => Array ( [0] => traditional-pizza ) [operator] => IN ) ) )

After get Product

WP_Query Object ( [query] => Array ( [post_type] => product [posts_per_page] => 20 [post_status] => publish [paged] => 0 [orderby] => [order] => [meta_query] => Array ( [0] => Array ( ) ) [tax_query] => Array ( [0] => Array ( [taxonomy] => product_cat [field] => slug [terms] => Array ( [0] => traditional-pizza ) [operator] => IN ) ) ) [query_vars] => Array ( [post_type] => product [posts_per_page] => 999 [post_status] => publish [paged] => 0 [orderby] => [order] => DESC [meta_query] => Array ( [0] => Array ( ) ) [tax_query] => Array ( [0] => Array ( [taxonomy] => product_cat [field] => slug [terms] => Array ( [0] => traditional-pizza ) [operator] => IN ) ) [error] => [m] => [p] => 0 [post_parent] => [subpost] => [subpost_id] => [attachment] => [attachment_id] => 0 [name] => [static] => [pagename] => [page_id] => 0 [second] => [minute] => [hour] => [day] => 0 [monthnum] => 0 [year] => 0 [w] => 0 [category_name] => [tag] => [cat] => [tag_id] => [author] => [author_name] => [feed] => [tb] => [meta_key] => [meta_value] => [preview] => [s] => [sentence] => [title] => [fields] => [menu_order] => [embed] => [category__in] => Array ( ) [category__not_in] => Array ( ) [category__and] => Array ( ) [post__in] => Array ( ) [post__not_in] => Array ( ) [post_name__in] => Array ( ) [tag__in] => Array ( ) [tag__not_in] => Array ( ) [tag__and] => Array ( ) [tag_slug__in] => Array ( ) [tag_slug__and] => Array ( ) [post_parent__in] => Array ( ) [post_parent__not_in] => Array ( ) [author__in] => Array ( ) [author__not_in] => Array ( ) [ignore_sticky_posts] => [suppress_filters] => [cache_results] => 1 [update_post_term_cache] => 1 [lazy_load_term_meta] => 1 [update_post_meta_cache] => 1 [nopaging] => [comments_per_page] => 50 [no_found_rows] => [taxonomy] => product_cat [term] => traditional-pizza ) [tax_query] => WP_Tax_Query Object ( [queries] => Array ( [0] => Array ( [taxonomy] => product_cat [terms] => Array ( [0] => traditional-pizza ) [field] => slug [operator] => IN [include_children] => 1 ) ) [relation] => AND [table_aliases:protected] => Array ( [0] => wp_term_relationships ) [queried_terms] => Array ( [product_cat] => Array ( [terms] => Array ( [0] => traditional-pizza ) [field] => slug ) ) [primary_table] => wp_posts [primary_id_column] => ID ) [meta_query] => WP_Meta_Query Object ( [queries] => Array ( ) [relation] => AND [meta_table] => [meta_id_column] => [primary_table] => [primary_id_column] => [table_aliases:protected] => Array ( ) [clauses:protected] => Array ( ) [has_or_relation:protected] => ) [date_query] => [request] => SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (48) ) AND wp_posts.post_type = 'product' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 999 [posts] => Array ( [0] => WP_Post Object ( [ID] => 922 [post_author] => 1 [post_date] => 2019-03-14 20:29:12 [post_date_gmt] => 2019-03-14 20:29:12 [post_content] => [post_title] => Chocolate pizza [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => chocolate-pizza [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:18 [post_modified_gmt] => 2019-03-14 20:29:18 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-125/ [menu_order] => 25 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [1] => WP_Post Object ( [ID] => 919 [post_author] => 1 [post_date] => 2019-03-14 20:29:10 [post_date_gmt] => 2019-03-14 20:29:10 [post_content] => Tomato,cheese,chicken,pineapple with BBQ sauce. [post_title] => BBQ CHICKEN [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => bbq-chicken [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:15:31 [post_modified_gmt] => 2019-03-15 00:15:31 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-122/ [menu_order] => 22 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [2] => WP_Post Object ( [ID] => 920 [post_author] => 1 [post_date] => 2019-03-14 20:29:10 [post_date_gmt] => 2019-03-14 20:29:10 [post_content] => Tomato,cheese,chicken,pineapple,bacon,prawns. [post_title] => CHICKEN ROYALE [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => chicken-royale [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:17 [post_modified_gmt] => 2019-03-14 20:29:17 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-123/ [menu_order] => 23 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [3] => WP_Post Object ( [ID] => 921 [post_author] => 1 [post_date] => 2019-03-14 20:29:10 [post_date_gmt] => 2019-03-14 20:29:10 [post_content] => Tomato,cheese,minced beef with onion and oregano. [post_title] => BEEF PIZZA [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => beef-pizza [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:18 [post_modified_gmt] => 2019-03-14 20:29:18 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-124/ [menu_order] => 24 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [4] => WP_Post Object ( [ID] => 917 [post_author] => 1 [post_date] => 2019-03-14 20:29:09 [post_date_gmt] => 2019-03-14 20:29:09 [post_content] => Tomato,cheese,ham,mushroom,capsicum,hot salami,jalapenos with chilli. [post_title] => VOLCANO [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => volcano [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:17 [post_modified_gmt] => 2019-03-14 20:29:17 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-120/ [menu_order] => 20 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [5] => WP_Post Object ( [ID] => 918 [post_author] => 1 [post_date] => 2019-03-14 20:29:09 [post_date_gmt] => 2019-03-14 20:29:09 [post_content] => Tomato,cheese,mushroom,chicken and garlic. [post_title] => CHICKEN [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => chicken [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:17 [post_modified_gmt] => 2019-03-14 20:29:17 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-121/ [menu_order] => 21 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [6] => WP_Post Object ( [ID] => 913 [post_author] => 1 [post_date] => 2019-03-14 20:29:08 [post_date_gmt] => 2019-03-14 20:29:08 [post_content] => HAWAIAN,MARGHERITA,AUSSIE AND MEATLOVERS. [post_title] => FOUR QUARTERS [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => four-quarters [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:17 [post_modified_gmt] => 2019-03-14 20:29:17 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-116/ [menu_order] => 16 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [7] => WP_Post Object ( [ID] => 914 [post_author] => 1 [post_date] => 2019-03-14 20:29:08 [post_date_gmt] => 2019-03-14 20:29:08 [post_content] => Tomato,cheese,assorted seafood mix with garlic and oregano. [post_title] => MARINARA [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => marinara [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:17 [post_modified_gmt] => 2019-03-14 20:29:17 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-117/ [menu_order] => 17 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [8] => WP_Post Object ( [ID] => 915 [post_author] => 1 [post_date] => 2019-03-14 20:29:08 [post_date_gmt] => 2019-03-14 20:29:08 [post_content] => Tomato,cheese,ham,mushroom,onion,capcicum,pineapple,olives,bacon,hotsalami,prawns. [post_title] => THE LOT [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => the-lot [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:16:15 [post_modified_gmt] => 2019-03-15 00:16:15 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-118/ [menu_order] => 18 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [9] => WP_Post Object ( [ID] => 916 [post_author] => 1 [post_date] => 2019-03-14 20:29:08 [post_date_gmt] => 2019-03-14 20:29:08 [post_content] => Tomato,cheese,ham ,mushroom,onion,capsicum,hot salami,bacon,olives,chilli and oregano. [post_title] => HOUSE SPECIAL [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => house-special [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:16:42 [post_modified_gmt] => 2019-03-15 00:16:42 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-119/ [menu_order] => 19 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [10] => WP_Post Object ( [ID] => 909 [post_author] => 1 [post_date] => 2019-03-14 20:29:07 [post_date_gmt] => 2019-03-14 20:29:07 [post_content] => Tomato,cheese,olives,anchovies and oregano. [post_title] => NAPOLETANA [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => napoletana [to_ping] => [pinged] => [post_modified] => 2019-03-25 15:09:19 [post_modified_gmt] => 2019-03-25 15:09:19 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-112/ [menu_order] => 12 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [11] => WP_Post Object ( [ID] => 910 [post_author] => 1 [post_date] => 2019-03-14 20:29:07 [post_date_gmt] => 2019-03-14 20:29:07 [post_content] => Tomato,cheese,loads of bacon end egg. [post_title] => EGG AND BACON [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => egg-and-bacon [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:16 [post_modified_gmt] => 2019-03-14 20:29:16 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-113/ [menu_order] => 13 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [12] => WP_Post Object ( [ID] => 911 [post_author] => 1 [post_date] => 2019-03-14 20:29:07 [post_date_gmt] => 2019-03-14 20:29:07 [post_content] => Tomato,cheese,ham,mushroom,bacon,prawns and egg. [post_title] => SUPER AUSSIE [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => super-aussie [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:16 [post_modified_gmt] => 2019-03-14 20:29:16 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-114/ [menu_order] => 14 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [13] => WP_Post Object ( [ID] => 912 [post_author] => 1 [post_date] => 2019-03-14 20:29:07 [post_date_gmt] => 2019-03-14 20:29:07 [post_content] => Tomato,cheese,ham,bacon,chicken,hot salami with BBQ sauce. [post_title] => MEATLOVERS [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => meatlovers [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:17 [post_modified_gmt] => 2019-03-14 20:29:17 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-115/ [menu_order] => 15 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [14] => WP_Post Object ( [ID] => 906 [post_author] => 1 [post_date] => 2019-03-14 20:29:06 [post_date_gmt] => 2019-03-14 20:29:06 [post_content] => Tomato,cheese,ham ,capsicum and hot salami. [post_title] => AMERICANA [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => americana [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:09:46 [post_modified_gmt] => 2019-03-15 00:09:46 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-109/ [menu_order] => 9 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [15] => WP_Post Object ( [ID] => 907 [post_author] => 1 [post_date] => 2019-03-14 20:29:06 [post_date_gmt] => 2019-03-14 20:29:06 [post_content] => Tomato,cheese,capsicum,hot salami with chilli. [post_title] => MEXICANA [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => mexicana [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:15 [post_modified_gmt] => 2019-03-14 20:29:15 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-110/ [menu_order] => 10 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [16] => WP_Post Object ( [ID] => 908 [post_author] => 1 [post_date] => 2019-03-14 20:29:06 [post_date_gmt] => 2019-03-14 20:29:06 [post_content] => Tomato,cheese,hot salami,olives and anchovies. [post_title] => PEPPERONI [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => pepperoni [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:15 [post_modified_gmt] => 2019-03-14 20:29:15 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-111/ [menu_order] => 11 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [17] => WP_Post Object ( [ID] => 905 [post_author] => 1 [post_date] => 2019-03-14 20:29:05 [post_date_gmt] => 2019-03-14 20:29:05 [post_content] => Tomato,cheese ,egg,ham,bacon and egg. [post_title] => AUSSIE [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => aussie [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:13:14 [post_modified_gmt] => 2019-03-15 00:13:14 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-108/ [menu_order] => 8 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [18] => WP_Post Object ( [ID] => 904 [post_author] => 1 [post_date] => 2019-03-14 20:29:04 [post_date_gmt] => 2019-03-14 20:29:04 [post_content] => Tomato,cheese ,ham ,mushrooms,olives and anchovies. [post_title] => CAPPRICIOSA [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => cappriciosa [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:15 [post_modified_gmt] => 2019-03-14 20:29:15 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-107/ [menu_order] => 7 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [19] => WP_Post Object ( [ID] => 903 [post_author] => 1 [post_date] => 2019-03-14 20:29:02 [post_date_gmt] => 2019-03-14 20:29:02 [post_content] => Tomato,cheese ,ham and mushrooms. [post_title] => CAPPRI [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => cappri [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:15 [post_modified_gmt] => 2019-03-14 20:29:15 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-106/ [menu_order] => 6 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [20] => WP_Post Object ( [ID] => 901 [post_author] => 1 [post_date] => 2019-03-14 20:29:01 [post_date_gmt] => 2019-03-14 20:29:01 [post_content] => Tomato,cheese,mushroom,onion,capsicum,olives and pineapples. [post_title] => VEGETERIAN(v) [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => vegeterianv [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:25:22 [post_modified_gmt] => 2019-03-15 00:25:22 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-104/ [menu_order] => 4 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [21] => WP_Post Object ( [ID] => 902 [post_author] => 1 [post_date] => 2019-03-14 20:29:01 [post_date_gmt] => 2019-03-14 20:29:01 [post_content] => Tomato,cheese ,ham and pineapples. [post_title] => HAWAIAN [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => hawaian [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:24:10 [post_modified_gmt] => 2019-03-15 00:24:10 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-105/ [menu_order] => 5 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [22] => WP_Post Object ( [ID] => 897 [post_author] => 1 [post_date] => 2019-03-14 20:28:59 [post_date_gmt] => 2019-03-14 20:28:59 [post_content] => Tomato,double cheese and oregano. [post_title] => MARGHERITA(V) [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => margheritav [to_ping] => [pinged] => [post_modified] => 2019-03-25 12:04:16 [post_modified_gmt] => 2019-03-25 12:04:16 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-100/ [menu_order] => 0 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [23] => WP_Post Object ( [ID] => 898 [post_author] => 1 [post_date] => 2019-03-14 20:28:59 [post_date_gmt] => 2019-03-14 20:28:59 [post_content] => Garlic,double cheese,oregano and salt. [post_title] => GARLIC(v) [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => garlicv [to_ping] => [pinged] => [post_modified] => 2019-03-25 14:55:56 [post_modified_gmt] => 2019-03-25 14:55:56 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-101/ [menu_order] => 1 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [24] => WP_Post Object ( [ID] => 899 [post_author] => 1 [post_date] => 2019-03-14 20:28:59 [post_date_gmt] => 2019-03-14 20:28:59 [post_content] => garlic,cheese and herbs. [post_title] => FOCACCIA(V) [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => focacciav [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:14 [post_modified_gmt] => 2019-03-14 20:29:14 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-102/ [menu_order] => 2 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [25] => WP_Post Object ( [ID] => 900 [post_author] => 1 [post_date] => 2019-03-14 20:28:59 [post_date_gmt] => 2019-03-14 20:28:59 [post_content] => Tomato ,loads of mushroom with cheese. [post_title] => MUSHROOM(V) [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => mushroomv [to_ping] => [pinged] => [post_modified] => 2019-03-15 00:26:09 [post_modified_gmt] => 2019-03-15 00:26:09 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-103/ [menu_order] => 3 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) ) [post_count] => 26 [current_post] => -1 [in_the_loop] => [post] => WP_Post Object ( [ID] => 922 [post_author] => 1 [post_date] => 2019-03-14 20:29:12 [post_date_gmt] => 2019-03-14 20:29:12 [post_content] => [post_title] => Chocolate pizza [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => closed [post_password] => [post_name] => chocolate-pizza [to_ping] => [pinged] => [post_modified] => 2019-03-14 20:29:18 [post_modified_gmt] => 2019-03-14 20:29:18 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost/harvestpizza/product/import-placeholder-for-125/ [menu_order] => 25 [post_type] => product [post_mime_type] => [comment_count] => 0 [filter] => raw ) [comment_count] => 0 [current_comment] => -1 [found_posts] => 26 [max_num_pages] => 1 [max_num_comment_pages] => 0 [is_single] => [is_preview] => [is_page] => [is_archive] => 1 [is_date] => [is_year] => [is_month] => [is_day] => [is_time] => [is_author] => [is_category] => [is_tag] => [is_tax] => 1 [is_search] => [is_feed] => [is_comment_feed] => [is_trackback] => [is_home] => [is_404] => [is_embed] => [is_paged] => [is_admin] => [is_attachment] => [is_singular] => [is_robots] => [is_posts_page] => [is_post_type_archive] => 1 [query_vars_hash:WP_Query:private] => 5efdffdb75153bccce8880eb2980f959 [query_vars_changed:WP_Query:private] => 1 [thumbnails_cached] => [stopwords:WP_Query:private] => [compat_fields:WP_Query:private] => Array ( [0] => query_vars_hash [1] => query_vars_changed ) [compat_methods:WP_Query:private] => Array ( [0] => init_query_flags [1] => parse_tax_query ) )

1

1 Answers

0
votes
$args = array( 
   'post_type'=>'product', 
   'posts_per_page' => 10,
   'no_found_rows' => true, 
   'update_post_term_cache' => false, 
   'update_post_meta_cache' => false, 
   'nopaging' => true,
  'order' => 'DESC', 
);
$query = new WP_Query( $args );

Modify it as per your need. I hope it will work fine :)