{"id":1192094,"date":"2016-11-14T14:12:45","date_gmt":"2016-11-14T22:12:45","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/"},"modified":"2016-11-14T14:12:45","modified_gmt":"2016-11-14T22:12:45","slug":"show-product-not-tickets","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/","title":{"rendered":"show product not tickets"},"content":{"rendered":"<p>Hi,<br \/>\nI want display some product there aren&#8217;t ticket.<br \/>\nso what is the right query?<br \/>\n<code>&lt;?php<br \/>\n\t\t$args = array(<br \/>\n\t\t\t'post_type' =&gt; 'product',<br \/>\n\t\t\t'posts_per_page' =&gt; 50,<br \/>\n\t\t\t);<br \/>\n\t\t$loop = new WP_Query( $args );<br \/>\n\t\tif ( $loop-&gt;have_posts() ) {<br \/>\n\t\t\twhile ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;<\/p>\n<p>\t\t\t<a>\" title=\"&lt;?php the_title(); ?&gt;\"&gt;<\/p>\n<h3>&lt;?php the_title(); ?&gt;<\/h3>\n<p><\/a><\/p>\n<p>\t\t\t&lt;?php<br \/>\n\t\t\tendwhile;<br \/>\n\t\t} else {<br \/>\n\t\t\techo __( 'No products found' );<br \/>\n\t\t}<br \/>\n\t\twp_reset_postdata();<br \/>\n\t?&gt;<\/code><\/p>\n<p>If I use this it show all the products.<br \/>\nthanks<\/p>\n","protected":false},"template":"","class_list":["post-1192094","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>show product not tickets -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"show product not tickets -\" \/>\n<meta property=\"og:description\" content=\"Hi, I want display some product there aren&#8217;t ticket. so what is the right query? &lt;?php $args = array( &#039;post_type&#039; =&gt; &#039;product&#039;, &#039;posts_per_page&#039; =&gt; 50, ); $loop = new WP_Query( $args ); if ( $loop-&gt;have_posts() ) { while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt; &quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt; &lt;?php the_title(); ?&gt; &lt;?php endwhile; } else [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/\",\"name\":\"show product not tickets -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-11-14T22:12:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"show product not tickets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"show product not tickets -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/","og_locale":"en_US","og_type":"article","og_title":"show product not tickets -","og_description":"Hi, I want display some product there aren&#8217;t ticket. so what is the right query? &lt;?php $args = array( 'post_type' =&gt; 'product', 'posts_per_page' =&gt; 50, ); $loop = new WP_Query( $args ); if ( $loop-&gt;have_posts() ) { while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt; \" title=\"&lt;?php the_title(); ?&gt;\"&gt; &lt;?php the_title(); ?&gt; &lt;?php endwhile; } else [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/","name":"show product not tickets -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-11-14T22:12:45+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-product-not-tickets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"show product not tickets"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1192094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1192094\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1192094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}