{"id":257,"date":"2012-08-29T08:31:18","date_gmt":"2012-08-29T08:31:18","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=257"},"modified":"2012-08-29T08:33:09","modified_gmt":"2012-08-29T08:33:09","slug":"conditional-tags-for-wp-e-commerce","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/conditional-tags-for-wp-e-commerce\/","title":{"rendered":"Conditional Tags for WP E-Commerce"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"25\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-upgrade-wordpress\/wordpresslogo\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" data-orig-size=\"498,113\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"WordPress &#8211; the logo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=300%2C68&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" class=\"aligncenter size-medium wp-image-25\" title=\"WordPress - the logo\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=300%2C68\" alt=\"\" width=\"300\" height=\"68\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?resize=300%2C68&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?w=498&amp;ssl=1 498w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The following conditional works when you install WP E-Commerce and you want to add PHP code in page.php .I want to breadcrumbs in pages but doesn&#8217;t want it to display on WP E-Commerce Product page, because the product already showing its own breadcrumbs<\/p>\n<p>The following conditional tag apple to non-Product Page:<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">&lt;?php if ('wpsc-product' != get_post_type())  { ?&gt;\r\n         do stuff\r\n&lt;?php }?&gt;<\/pre>\n<p>The following conditional tags apply to Product Page:<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">&lt;?php if ('wpsc-product' != get_post_type())  { ?&gt;\r\n         do stuff\r\n&lt;?php }?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following conditional works when you install WP E-Commerce and you want to add PHP code in page.php .I want to breadcrumbs in pages but doesn&#8217;t want it to display on WP E-Commerce Product page, because the product already showing its own breadcrumbs The following conditional tag apple to non-Product Page: &lt;?php if (&#8216;wpsc-product&#8217; != [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[54,5],"tags":[92,6,91],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-code-snippet","category-wordpress","tag-getshopped","tag-wordpress-2","tag-wp-e-commerce"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-49","jetpack-related-posts":[{"id":292,"url":"https:\/\/pixert.com\/blog\/wordpress-conditional-tag-for-login-page\/","url_meta":{"origin":257,"position":0},"title":"WordPress Conditional Tag for Login Page","author":"Pixel Insert \/ Pixert","date":"March 6, 2013","format":false,"excerpt":"WordPress have conditional tags. The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches Following conditional tag is specific to Login Page, that is currently not available\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"wordpress-logo-notext-rgb","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/08\/wordpress-logo-notext-rgb.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":305,"url":"https:\/\/pixert.com\/blog\/wordpress-conditional-tag-to-check-specific-menu\/","url_meta":{"origin":257,"position":1},"title":"WordPress: Conditional tag to check a specific menu","author":"Pixel Insert \/ Pixert","date":"May 22, 2013","format":false,"excerpt":"Following conditional tag usually use in this filter function, wp_nav_menu_items [php]if( $args->theme_location == 'primary' )[\/php] \u00a0 [php]if( $args->theme_location == 'secondary' )[\/php] \u00a0 [php]if( $args->theme_location == 'primary' )[\/php] For an example, I want to add search box to Primary Menu in WPZOOM theme name Videozoom. Conditional tag above make sure the\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"wordpress-logo-notext-rgb","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/08\/wordpress-logo-notext-rgb.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":416,"url":"https:\/\/pixert.com\/blog\/wordpress-title-empty-on-index-page\/","url_meta":{"origin":257,"position":2},"title":"WordPress Title Empty on Index Page","author":"Pixel Insert \/ Pixert","date":"November 2, 2014","format":false,"excerpt":"Here's description from WordPress Codex about what happen when WordPress title empty when viewing index page\/ homepage If you are using a custom homepage with custom loops and stuff or a custom front-page, you will have an empty wp_title. I recently encountered this problem on a client's site. Homepage\/Index page\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":229,"url":"https:\/\/pixert.com\/blog\/php-conditional-statement-to-identify-ipad-or-ipod-or-iphone\/","url_meta":{"origin":257,"position":3},"title":"PHP Conditional statements to identify iPad or iPod or iPhone","author":"Pixel Insert \/ Pixert","date":"June 1, 2012","format":false,"excerpt":"This tutorial will show you how to detect iPad or iPod or iPhone using PHP Devices which request content from your website (usually) pass a user agent string. This contains information such as its name, OS, browser version, and rendering engine. Apple\u2019s gadgets pass the following user agents, although you\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/05\/ipadiphoneipod.jpg?fit=649%2C540&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/05\/ipadiphoneipod.jpg?fit=649%2C540&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/05\/ipadiphoneipod.jpg?fit=649%2C540&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":195,"url":"https:\/\/pixert.com\/blog\/redirect-certain-pages-from-http-to-https-with-htaccess\/","url_meta":{"origin":257,"position":4},"title":"Redirect certain pages from http to https with .htaccess","author":"Pixel Insert \/ Pixert","date":"February 10, 2012","format":false,"excerpt":"The following trick is useful for E-Commerce sites. \u00a0We only need few pages redirected to https to secure transaction This will automatically rewrite the url to https as long as the page is not already an https link. This conditional keeps it from causing a loop. It's very handy to\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":214,"url":"https:\/\/pixert.com\/blog\/how-to-fix-also-bought-noimage-error-wp-ecommerce\/","url_meta":{"origin":257,"position":5},"title":"How to fix &#8220;people who bought this item also bought&#8221; no image error in wp e-commerce","author":"Pixel Insert \/ Pixert","date":"March 23, 2012","format":false,"excerpt":"Cross Sales is a feature under WP E-Commerce . You can find this under Store Settings > Marketing. An user will see what other people bought with regard to the current product being displayed. Upon activating it though, an error, \u201cNO IMAGE\u201d default thumbnail under that category\u00a0which does not display\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}