Tag: conditional tags
Understanding is_singular() in WordPress Templates


This text and video Quick Guide explains how to use is_singular(), one of the more useful WordPress template tags. We also explain the difference between the is_singular() conditional tag, and the two other related ones: is_page() and is_single().
How to Use WordPress Conditional Tags


One of the most straightforward, dependable, and useful things in WordPress is what the Codex calls “Conditional Tags.” In her interview for Up and Running, Helen Hou-Sandí said WordPress conditional tags were her favorite WordPress functions for their simplicity and ease of use — they read just like English. We agree with her on that. They’re great. To explain them to you in more depth, we’re sharing a chapter of Up and Running here on WPShout. Let’s get to business understanding conditional tags in WordPress!
Adding an is_product_subcategory() Conditional Tag to WooCommerce


I’ve got a project that needs to treat WooCommerce category pages differently from its subcategory pages. Both use taxonomy-product_cat.php, though. What I’d really love to do is change just the search field in that template, depending on whether a particular page is showing a top-level category or a subcategory.